when using vfs module need to cut off full file path

This commit is contained in:
robweber 2012-05-25 16:02:23 -05:00
parent 707bd61863
commit 5163152ce8

View File

@ -53,8 +53,9 @@ class FileManager:
#this part is an oddity
configFiles = vfs.listdir(self.walk_path + "userdata/",extra_metadata=True)
for aFile in configFiles:
xbmc.log(aFile['file'][len(self.walk_path):])
if(aFile['file'].endswith(".xml")):
self.addFile("userdata/" + aFile['file'])
self.addFile(aFile['file'][len(self.walk_path):])
def walkTree(self,directory):
for (path, dirs, files) in vfs.walk(directory):