diff --git a/server/executor.py b/server/executor.py index 55e5817..41db393 100644 --- a/server/executor.py +++ b/server/executor.py @@ -65,7 +65,7 @@ class Executor: def putFileInCurrentDirectory(self, filename: str, content: bytes) -> str: 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.write(content) f.close() @@ -73,7 +73,7 @@ class Executor: def getFileInCurrentDirectory(self, file: str) -> bytes: 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): f = open(currentfile, "rb") content = f.read()