From 0e3ba17a8ebaf2ee9f008dccc46ba4faba1b7058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Thu, 29 Apr 2021 17:52:34 +0200 Subject: [PATCH] basedir --- server/executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()