mirror of
				https://github.com/robweber/xbmcbackup.git
				synced 2025-10-31 09:31:02 +01:00 
			
		
		
		
	modified directories not backing up - thanks bertel333
This commit is contained in:
		| @@ -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) | ||||
|          | ||||
| @@ -395,12 +396,20 @@ class FileManager: | ||||
|                 dirPath = xbmc.translatePath(directory + "/" + aDir) | ||||
|                 file_ext = aDir.split('.')[-1] | ||||
|                 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
	 Rob Weber
					Rob Weber