This commit is contained in:
parent
fe26bd1727
commit
ec5a36c700
@ -39,8 +39,11 @@ class Executor:
|
|||||||
p = Path(os.path.join(self.baseDir, self.currentDirectory))
|
p = Path(os.path.join(self.baseDir, self.currentDirectory))
|
||||||
parentpath = p.parent
|
parentpath = p.parent
|
||||||
if (str(parentpath) + os.path.sep)== self.baseDir:
|
if (str(parentpath) + os.path.sep)== self.baseDir:
|
||||||
|
self.currentDirectory = ""
|
||||||
return self.currentDirectory
|
return self.currentDirectory
|
||||||
else:
|
else:
|
||||||
|
if len(str(parentpath).split('/')) < len(self.baseDir.split('/')):
|
||||||
|
return self.currentDirectory
|
||||||
newpath = str(parentpath).replace(self.baseDir,'')
|
newpath = str(parentpath).replace(self.baseDir,'')
|
||||||
if os.path.exists(os.path.join(self.baseDir,newpath)):
|
if os.path.exists(os.path.join(self.baseDir,newpath)):
|
||||||
self.currentDirectory = newpath
|
self.currentDirectory = newpath
|
||||||
|
Loading…
Reference in New Issue
Block a user