finito execturo for real
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b8828d52b4
commit
89b7b68dfe
@ -36,7 +36,18 @@ class Executor:
|
||||
return self.currentDirectory
|
||||
|
||||
def setCurrentDirectory(self, dirName: str) -> str:
|
||||
# TODO : Navigate up a directory structure
|
||||
if dirName == "..":
|
||||
if self.currentDirectory == self.baseDir:
|
||||
return self.currentDirectory
|
||||
else:
|
||||
directories = self.currentDirectory.split("/")
|
||||
strdirectory = ""
|
||||
for dir in directories:
|
||||
strdirectory += dir + "/"
|
||||
strdirectory = strdirectory[:-3]
|
||||
self.currentDirectory = strdirectory
|
||||
return self.currentDirectory
|
||||
else:
|
||||
dirName = self.sanitizeDirectory(dirName)
|
||||
self.currentDirectory = self.currentDirectory + "/" + dirName
|
||||
return self.currentDirectory
|
||||
|
Loading…
Reference in New Issue
Block a user