mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-15 04:45:49 +01:00
updated for new file write checks
This commit is contained in:
parent
fae5a052c7
commit
744ba77251
@ -456,8 +456,8 @@ class XbmcBackup:
|
|||||||
else:
|
else:
|
||||||
self._updateProgress()
|
self._updateProgress()
|
||||||
wroteFile = True
|
wroteFile = True
|
||||||
if(isinstance(source,DropboxFileSystem)):
|
if(isinstance(source,DropboxFileSystem) or isinstance(source,GoogleDriveFilesystem)):
|
||||||
#if copying from dropbox we need the file handle, use get_file
|
#if copying from cloud storage we need the file handle, use get_file
|
||||||
wroteFile = source.get_file(aFile,dest.root_path + aFile[len(source.root_path):])
|
wroteFile = source.get_file(aFile,dest.root_path + aFile[len(source.root_path):])
|
||||||
else:
|
else:
|
||||||
#copy using normal method
|
#copy using normal method
|
||||||
|
@ -396,12 +396,17 @@ class GoogleDriveFilesystem(Vfs):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def get_file(self,source, dest):
|
def get_file(self,source, dest):
|
||||||
|
result = True
|
||||||
|
|
||||||
#get the id of this file
|
#get the id of this file
|
||||||
file = self._getGoogleFile(source)
|
file = self._getGoogleFile(source)
|
||||||
|
|
||||||
if(file != None):
|
if(file != None):
|
||||||
file.GetContentFile(dest)
|
file.GetContentFile(dest)
|
||||||
|
else:
|
||||||
|
result = False
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
def rmdir(self,directory):
|
def rmdir(self,directory):
|
||||||
result = True
|
result = True
|
||||||
|
Loading…
Reference in New Issue
Block a user