From 6d2441d931f197640b3c5855b9c59ee5052d1a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Thu, 29 Apr 2021 18:05:37 +0200 Subject: [PATCH] dirty workaround --- server/executor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/executor.py b/server/executor.py index 2d9121f..138a88b 100644 --- a/server/executor.py +++ b/server/executor.py @@ -84,7 +84,10 @@ class Executor: def removeFileInCurrentDirectory(self, file: str) -> str: file = self.sanitizeFile(file) - currentfile = os.path.join(self.baseDir, self.currentDirectory, file) + if self.currentDirectory == "": + currentfile = os.path.join(self.baseDir, file) + else: + currentfile = os.path.join(self.baseDir, self.currentDirectory, file) if os.path.exists(currentfile): os.remove(currentfile) return currentfile