From ae76d24e867243787f6fb1c2670a5d9a86cd685e Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Mon, 30 Sep 2019 09:44:18 -0500 Subject: [PATCH] use linux path seperator (/), was causing remote file system issues using os.path --- resources/lib/backup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lib/backup.py b/resources/lib/backup.py index ac54cd8..3f44cdd 100644 --- a/resources/lib/backup.py +++ b/resources/lib/backup.py @@ -542,6 +542,7 @@ class FileManager: not_dir = ['.zip','.xsp','.rar'] exclude_dir = [] root_dirs = [] + pathSep = '/' def __init__(self,vfs): self.vfs = vfs @@ -560,13 +561,13 @@ class FileManager: if(directory[-1:] == '/' or directory[-1:] == '\\'): directory = directory[:-1] - if(self.vfs.exists(directory + os.path.sep)): + if(self.vfs.exists(directory + self.pathSep)): dirs,files = self.vfs.listdir(directory) if(recurse): #create all the subdirs first for aDir in dirs: - dirPath = xbmc.validatePath(xbmc.translatePath(directory + os.path.sep + aDir)) + dirPath = xbmc.validatePath(xbmc.translatePath(directory + self.pathSep + aDir)) file_ext = aDir.split('.')[-1] #check if directory is excluded @@ -586,7 +587,7 @@ class FileManager: #copy all the files for aFile in files: - filePath = xbmc.translatePath(directory + os.path.sep + aFile) + filePath = xbmc.translatePath(directory + self.pathSep + aFile) self.addFile(filePath) def addDir(self,dirMeta):