mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 22:15:23 +01:00
dirs can't end in slash for dropbox "exists" method part of #114
This commit is contained in:
parent
588132c8dc
commit
e02245e422
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user