Fix PKC complaining about files not found

This commit is contained in:
tomkat83 2017-05-09 20:39:05 +02:00
parent c37961c600
commit 5f7d8df6f7

View file

@ -2544,16 +2544,16 @@ class API():
# 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(tryEncode(path)) == 1 check = exists(tryEncode(path))
else: else:
# directories # directories
if "\\" in path: if "\\" in path and not path.endswith('\\'):
# Add the missing backslash # Add the missing backslash
check = exists(tryEncode(path + "\\")) == 1 check = exists(tryEncode(path + "\\"))
else: elif "/" in path and not path.endswith('/'):
check = exists(tryEncode(path + "/")) == 1 check = exists(tryEncode(path + "/"))
if check is False: if not check:
if forceCheck is False: if forceCheck is False:
# Validate the path is correct with user intervention # Validate the path is correct with user intervention
if self.askToValidate(path): if self.askToValidate(path):