found old reference to os module replaced with vfs.pyo

added keymap and perperipheral_data folders to "config" area
This commit is contained in:
robweber 2012-05-25 15:57:48 -05:00
parent 842f56afd1
commit 707bd61863
3 changed files with 15 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmcbackup"
name="XBMC Backup" version="0.0.7" provider-name="robweber">
name="XBMC Backup" version="0.0.8" provider-name="robweber">
<requires>
<import addon="xbmc.python" version="2.0"/>
</requires>

View File

@ -23,3 +23,7 @@ File Selection is now followed for both backup and restore options
[b]Version 0.0.7[/b]
removed "restore.txt" file and now write file listing to memory list instead
[b]Version 0.0.8[/b]
modified vfs.py script to exclude handling zip files as directories, added keymap and peripheral data folders in the "config" section

View File

@ -44,11 +44,17 @@ class FileManager:
self.walkTree(self.walk_path + "userdata/Thumbnails")
if(Addon.getSetting("backup_config") == "true"):
#this one is an oddity
configFiles = os.listdir(self.walk_path + "userdata/")
self.addFile("-userdata/keymaps")
self.walkTree(self.walk_path + "userdata/keymaps")
self.addFile("-userdata/peripheral_data")
self.walkTree(self.walk_path + "userdata/peripheral_data")
#this part is an oddity
configFiles = vfs.listdir(self.walk_path + "userdata/",extra_metadata=True)
for aFile in configFiles:
if(aFile.endswith(".xml")):
self.addFile("userdata/" + aFile)
if(aFile['file'].endswith(".xml")):
self.addFile("userdata/" + aFile['file'])
def walkTree(self,directory):
for (path, dirs, files) in vfs.walk(directory):