This commit is contained in:
parent
ec5a36c700
commit
0e3ba17a8e
@ -65,7 +65,7 @@ class Executor:
|
|||||||
|
|
||||||
def putFileInCurrentDirectory(self, filename: str, content: bytes) -> str:
|
def putFileInCurrentDirectory(self, filename: str, content: bytes) -> str:
|
||||||
filename = self.sanitizeFile(filename)
|
filename = self.sanitizeFile(filename)
|
||||||
currenctfile = os.path.join(self.currentDirectory, filename)
|
currenctfile = os.path.join(self.baseDir, self.currentDirectory, filename)
|
||||||
f = open(currenctfile, "wb")
|
f = open(currenctfile, "wb")
|
||||||
f.write(content)
|
f.write(content)
|
||||||
f.close()
|
f.close()
|
||||||
@ -73,7 +73,7 @@ class Executor:
|
|||||||
|
|
||||||
def getFileInCurrentDirectory(self, file: str) -> bytes:
|
def getFileInCurrentDirectory(self, file: str) -> bytes:
|
||||||
file = self.sanitizeFile(file)
|
file = self.sanitizeFile(file)
|
||||||
currentfile = os.path.join(self.currentDirectory, file)
|
currentfile = os.path.join(self.baseDir, self.currentDirectory, file)
|
||||||
if os.path.exists(currentfile):
|
if os.path.exists(currentfile):
|
||||||
f = open(currentfile, "rb")
|
f = open(currentfile, "rb")
|
||||||
content = f.read()
|
content = f.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user