mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
make compression setting compatible with python 2.6 and above
This commit is contained in:
parent
eaf5f12245
commit
02e3a73623
@ -84,7 +84,7 @@ class ZipFileSystem(Vfs):
|
||||
|
||||
def __init__(self,rootString,mode):
|
||||
self.root_path = ""
|
||||
self.zip = zipfile.ZipFile(rootString,mode=mode,allowZip64=True)
|
||||
self.zip = zipfile.ZipFile(rootString,mode=mode,compression=zipfile.ZIP_DEFLATED,allowZip64=True)
|
||||
|
||||
def listdir(self,directory):
|
||||
return [[],[]]
|
||||
@ -97,7 +97,7 @@ class ZipFileSystem(Vfs):
|
||||
|
||||
aFile = xbmcvfs.File(xbmc.translatePath(source),'r')
|
||||
|
||||
self.zip.writestr(utils.encode(dest),aFile.read(),compress_type=zipfile.ZIP_DEFLATED)
|
||||
self.zip.writestr(utils.encode(dest),aFile.read())
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user