diff --git a/resources/lib/modules/system.py b/resources/lib/modules/system.py index 2d224e35e..89df27420 100644 --- a/resources/lib/modules/system.py +++ b/resources/lib/modules/system.py @@ -429,7 +429,8 @@ def do_backup(self, listItem=None): '', False, False, - self.BACKUP_DESTINATION ) + self.BACKUP_DESTINATION, + False ) if bckDir and os.path.exists(bckDir): # free space check @@ -446,8 +447,8 @@ def do_backup(self, listItem=None): self.backup_dlg.create('LibreELEC', oe._(32375)) if not os.path.exists(self.BACKUP_DESTINATION): os.makedirs(self.BACKUP_DESTINATION) - self.backup_file = oe.timestamp() + '.tar' - tar = tarfile.open(bckDir + self.backup_file, 'w') + self.backup_file = f'{oe.timestamp()}.tar.gz' + tar = tarfile.open(bckDir + self.backup_file, 'w:gz', compresslevel=1) for directory in self.BACKUP_DIRS: self.tar_add_folder(tar, directory) tar.close() @@ -462,10 +463,12 @@ def do_restore(self, listItem=None): restore_file_path = xbmcDialog.browse( 1, oe._(32373), 'files', - '??????????????.tar', + '.tar|.tar.gz|.tar.bz2|.tar.xz', False, False, - self.BACKUP_DESTINATION ) + self.BACKUP_DESTINATION, + False ) + # Do nothing if the dialog is cancelled - path will be the backup destination if not os.path.isfile(restore_file_path): return