From e02245e422667669fff9e5c1c0c42690705471a9 Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Fri, 8 Dec 2017 08:46:12 -0600 Subject: [PATCH] dirs can't end in slash for dropbox "exists" method part of #114 --- resources/lib/vfs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/lib/vfs.py b/resources/lib/vfs.py index 14b9341..c142483 100644 --- a/resources/lib/vfs.py +++ b/resources/lib/vfs.py @@ -188,7 +188,7 @@ class DropboxFileSystem(Vfs): def exists(self,aFile): aFile = self._fix_slashes(aFile) - + utils.log('check exists:' + aFile) if(self.client != None): #can't list root metadata if(aFile == ''): @@ -232,9 +232,14 @@ class DropboxFileSystem(Vfs): def _fix_slashes(self,filename): result = filename.replace('\\','/') + #root needs to be a blank string if(result == '/'): result = "" + #if dir ends in slash, remove it + if(result[-1:] == "/"): + result = result[:-1] + return result