mirror of
				https://github.com/robweber/xbmcbackup.git
				synced 2025-10-31 09:31:02 +01:00 
			
		
		
		
	exit if we can't delete the old archive
This commit is contained in:
		| @@ -87,4 +87,6 @@ | |||||||
| 	<string id="30093">Delete Authorization Info</string> | 	<string id="30093">Delete Authorization Info</string> | ||||||
| 	<string id="30094">This will delete any OAuth token files</string> | 	<string id="30094">This will delete any OAuth token files</string> | ||||||
| 	<string id="30095">Do you want to do this?</string> | 	<string id="30095">Do you want to do this?</string> | ||||||
|  | 	<string id="30096">Old Zip Archive could not be deleted</string> | ||||||
|  | 	<string id="30097">This needs to happen before a backup can run</string> | ||||||
| </strings> | </strings> | ||||||
|   | |||||||
| @@ -118,7 +118,10 @@ class XbmcBackup: | |||||||
|             if(utils.getSetting("compress_backups") == 'true'): |             if(utils.getSetting("compress_backups") == 'true'): | ||||||
|                 #delete old temp file |                 #delete old temp file | ||||||
|                 if(self.xbmc_vfs.exists(xbmc.translatePath('special://temp/xbmc_backup_temp.zip'))): |                 if(self.xbmc_vfs.exists(xbmc.translatePath('special://temp/xbmc_backup_temp.zip'))): | ||||||
|                     self.xbmc_vfs.rmfile(xbmc.translatePath('special://temp/xbmc_backup_temp.zip')) |                     if(not self.xbmc_vfs.rmfile(xbmc.translatePath('special://temp/xbmc_backup_temp.zip'))): | ||||||
|  |                         #we had some kind of error deleting the old file | ||||||
|  |                         xbmcgui.Dialog().ok(utils.getString(30010),utils.getString(30096),utils.getString(30097)) | ||||||
|  |                         return | ||||||
|                      |                      | ||||||
|                 #save the remote file system and use the zip vfs |                 #save the remote file system and use the zip vfs | ||||||
|                 self.saved_remote_vfs = self.remote_vfs |                 self.saved_remote_vfs = self.remote_vfs | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Rob Weber
					Rob Weber