mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-15 04:45:49 +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):
|
def exists(self,aFile):
|
||||||
aFile = self._fix_slashes(aFile)
|
aFile = self._fix_slashes(aFile)
|
||||||
|
utils.log('check exists:' + aFile)
|
||||||
if(self.client != None):
|
if(self.client != None):
|
||||||
#can't list root metadata
|
#can't list root metadata
|
||||||
if(aFile == ''):
|
if(aFile == ''):
|
||||||
@ -232,9 +232,14 @@ class DropboxFileSystem(Vfs):
|
|||||||
def _fix_slashes(self,filename):
|
def _fix_slashes(self,filename):
|
||||||
result = filename.replace('\\','/')
|
result = filename.replace('\\','/')
|
||||||
|
|
||||||
|
#root needs to be a blank string
|
||||||
if(result == '/'):
|
if(result == '/'):
|
||||||
result = ""
|
result = ""
|
||||||
|
|
||||||
|
#if dir ends in slash, remove it
|
||||||
|
if(result[-1:] == "/"):
|
||||||
|
result = result[:-1]
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user