basedir
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Torma Kristóf 2021-04-29 17:52:34 +02:00
parent ec5a36c700
commit 0e3ba17a8e
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -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()