mirror of
https://github.com/robweber/xbmcbackup.git
synced 2025-06-23 19:14:33 +02:00
modified directories not backing up - thanks bertel333
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user