From 5f7d8df6f7370a9ed7b26c99919983d9645b8816 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Tue, 9 May 2017 20:39:05 +0200 Subject: [PATCH] Fix PKC complaining about files not found --- resources/lib/PlexAPI.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 0d8c897e..3dcc8696 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -2544,16 +2544,16 @@ class API(): # exist() needs a / or \ at the end to work for directories if folder is False: # files - check = exists(tryEncode(path)) == 1 + check = exists(tryEncode(path)) else: # directories - if "\\" in path: + if "\\" in path and not path.endswith('\\'): # Add the missing backslash - check = exists(tryEncode(path + "\\")) == 1 - else: - check = exists(tryEncode(path + "/")) == 1 + check = exists(tryEncode(path + "\\")) + elif "/" in path and not path.endswith('/'): + check = exists(tryEncode(path + "/")) - if check is False: + if not check: if forceCheck is False: # Validate the path is correct with user intervention if self.askToValidate(path):