mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
modified directories not backing up - thanks bertel333
This commit is contained in:
parent
d28596728b
commit
4dd6c90ab9
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="script.xbmcbackup"
|
||||
name="XBMC Backup" version="0.4.3" provider-name="robweber">
|
||||
name="XBMC Backup" version="0.4.4" provider-name="robweber">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
</requires>
|
||||
|
@ -1,3 +1,7 @@
|
||||
Version 0.4.4
|
||||
|
||||
modified the check for invalid file types
|
||||
|
||||
Version 0.4.3
|
||||
|
||||
added error message if remote directory is blank
|
||||
|
@ -387,6 +387,7 @@ class FileManager:
|
||||
self.vfs = vfs
|
||||
|
||||
def walkTree(self,directory):
|
||||
|
||||
if(self.vfs.exists(directory)):
|
||||
dirs,files = self.vfs.listdir(directory)
|
||||
|
||||
@ -394,13 +395,21 @@ class FileManager:
|
||||
for aDir in dirs:
|
||||
dirPath = xbmc.translatePath(directory + "/" + aDir)
|
||||
file_ext = aDir.split('.')[-1]
|
||||
self.addFile("-" + dirPath)
|
||||
self.addFile("-" + dirPath)
|
||||
|
||||
#catch for "non directory" type files
|
||||
if (not any(file_ext in s for s in self.not_dir)):
|
||||
shouldWalk = True
|
||||
|
||||
for s in file_ext:
|
||||
if(s in self.not_dir):
|
||||
shouldWalk = False
|
||||
|
||||
if(shouldWalk):
|
||||
self.walkTree(dirPath)
|
||||
|
||||
#copy all the files
|
||||
for aFile in files:
|
||||
utils.log(aFile)
|
||||
filePath = xbmc.translatePath(directory + "/" + aFile)
|
||||
self.addFile(filePath)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user