parent
75d2557da8
commit
aacd882e8b
1 changed files with 8 additions and 11 deletions
|
@ -33,7 +33,6 @@ from logging import getLogger
|
||||||
from re import sub
|
from re import sub
|
||||||
from urllib import urlencode, unquote
|
from urllib import urlencode, unquote
|
||||||
from xbmcgui import ListItem
|
from xbmcgui import ListItem
|
||||||
from xbmcvfs import exists
|
|
||||||
|
|
||||||
from .downloadutils import DownloadUtils as DU
|
from .downloadutils import DownloadUtils as DU
|
||||||
from . import clientinfo
|
from . import clientinfo
|
||||||
|
@ -1594,22 +1593,20 @@ class API(object):
|
||||||
# exist() needs a / or \ at the end to work for directories
|
# exist() needs a / or \ at the end to work for directories
|
||||||
if folder is False:
|
if folder is False:
|
||||||
# files
|
# files
|
||||||
check = exists(utils.try_encode(path))
|
check = path_ops.exists(path)
|
||||||
else:
|
else:
|
||||||
# directories
|
# directories
|
||||||
checkpath = utils.try_encode(path)
|
if "\\" in path:
|
||||||
if b"\\" in checkpath:
|
if not path.endswith('\\'):
|
||||||
if not checkpath.endswith('\\'):
|
|
||||||
# Add the missing backslash
|
# Add the missing backslash
|
||||||
check = utils.exists_dir(checkpath + "\\")
|
check = path_ops.exists(path + "\\")
|
||||||
else:
|
else:
|
||||||
check = utils.exists_dir(checkpath)
|
check = path_ops.exists(path)
|
||||||
else:
|
else:
|
||||||
if not checkpath.endswith('/'):
|
if not path.endswith('/'):
|
||||||
check = utils.exists_dir(checkpath + "/")
|
check = path_ops.exists(path + "/")
|
||||||
else:
|
else:
|
||||||
check = utils.exists_dir(checkpath)
|
check = path_ops.exists(path)
|
||||||
|
|
||||||
if not check:
|
if not check:
|
||||||
if force_check is False:
|
if force_check is False:
|
||||||
# Validate the path is correct with user intervention
|
# Validate the path is correct with user intervention
|
||||||
|
|
Loading…
Reference in a new issue