mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
minor fixes
This commit is contained in:
parent
9add0b2981
commit
97a977c721
@ -314,7 +314,6 @@ class XbmcBackup:
|
||||
self.remote_vfs = XBMCFileSystem(xbmc.translatePath("special://temp/" + self.restore_point.split(".")[0] + "/"))
|
||||
self.xbmc_vfs.set_root(xbmc.translatePath("special://home/"))
|
||||
|
||||
|
||||
#for restores remote path must exist
|
||||
if(not self.remote_vfs.exists(self.remote_vfs.root_path)):
|
||||
xbmcgui.Dialog().ok(utils.getString(30010),utils.getString(30045),self.remote_vfs.root_path)
|
||||
@ -535,12 +534,15 @@ class XbmcBackup:
|
||||
result = False
|
||||
|
||||
#copy the file and open it
|
||||
self.xbmc_vfs.put(path + "xbmcbackup.val",xbmc.translatePath(utils.data_dir() + "xbmcbackup.val"))
|
||||
self.xbmc_vfs.put(path + "xbmcbackup.val",xbmc.translatePath(utils.data_dir() + "xbmcbackup_restore.val"))
|
||||
|
||||
vFile = xbmcvfs.File(xbmc.translatePath(utils.data_dir() + "xbmcbackup.val"),'r')
|
||||
vFile = xbmcvfs.File(xbmc.translatePath(utils.data_dir() + "xbmcbackup_restore.val"),'r')
|
||||
jsonString = vFile.read()
|
||||
vFile.close()
|
||||
|
||||
#delete after checking
|
||||
xbmcvfs.delete(xbmc.translatePath(utils.data_dir() + "xbmcbackup_restore.val"))
|
||||
|
||||
try:
|
||||
json_dict = json.loads(jsonString)
|
||||
|
||||
@ -569,6 +571,9 @@ class FileManager:
|
||||
|
||||
def walkTree(self,directory):
|
||||
|
||||
if(directory[-1:] == '/'):
|
||||
directory = directory[:-1]
|
||||
|
||||
if(self.vfs.exists(directory + "/")):
|
||||
dirs,files = self.vfs.listdir(directory)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user