mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
use linux path seperator (/), was causing remote file system issues using os.path
This commit is contained in:
parent
4d56331d8f
commit
ae76d24e86
@ -542,6 +542,7 @@ class FileManager:
|
|||||||
not_dir = ['.zip','.xsp','.rar']
|
not_dir = ['.zip','.xsp','.rar']
|
||||||
exclude_dir = []
|
exclude_dir = []
|
||||||
root_dirs = []
|
root_dirs = []
|
||||||
|
pathSep = '/'
|
||||||
|
|
||||||
def __init__(self,vfs):
|
def __init__(self,vfs):
|
||||||
self.vfs = vfs
|
self.vfs = vfs
|
||||||
@ -560,13 +561,13 @@ class FileManager:
|
|||||||
if(directory[-1:] == '/' or directory[-1:] == '\\'):
|
if(directory[-1:] == '/' or directory[-1:] == '\\'):
|
||||||
directory = 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)
|
dirs,files = self.vfs.listdir(directory)
|
||||||
|
|
||||||
if(recurse):
|
if(recurse):
|
||||||
#create all the subdirs first
|
#create all the subdirs first
|
||||||
for aDir in dirs:
|
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]
|
file_ext = aDir.split('.')[-1]
|
||||||
|
|
||||||
#check if directory is excluded
|
#check if directory is excluded
|
||||||
@ -586,7 +587,7 @@ class FileManager:
|
|||||||
|
|
||||||
#copy all the files
|
#copy all the files
|
||||||
for aFile in files:
|
for aFile in files:
|
||||||
filePath = xbmc.translatePath(directory + os.path.sep + aFile)
|
filePath = xbmc.translatePath(directory + self.pathSep + aFile)
|
||||||
self.addFile(filePath)
|
self.addFile(filePath)
|
||||||
|
|
||||||
def addDir(self,dirMeta):
|
def addDir(self,dirMeta):
|
||||||
|
Loading…
Reference in New Issue
Block a user