From 3e0afb0d452db8c4eae9fd6fa652879e38e9cd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Mon, 26 Apr 2021 13:50:28 +0200 Subject: [PATCH] copypaste went wild --- server/server.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/server.py b/server/server.py index 04be114..7a11b00 100644 --- a/server/server.py +++ b/server/server.py @@ -73,8 +73,7 @@ class Server: if secondParam != "" or firstParam != "": self.networkInstance.sendMessage("ERROR".encode('UTF-8')) else: - self.executor.getCurrentDirectory() - self.networkInstance.sendMessage("OK".encode('UTF-8')) + self.networkInstance.sendMessage(self.executor.getCurrentDirectory().encode('UTF-8')) elif command == "CWD": if secondParam != "": self.networkInstance.sendMessage("ERROR".encode('UTF-8')) @@ -85,8 +84,7 @@ class Server: if secondParam != "" or firstParam != "": self.networkInstance.sendMessage("ERROR".encode('UTF-8')) else: - self.executor.listCurrentDirectoryContent() - self.networkInstance.sendMessage("OK".encode('UTF-8')) + self.networkInstance.sendMessage(self.executor.listCurrentDirectoryContent().encode('UTF-8')) elif command == "RMF": if secondParam != "": self.networkInstance.sendMessage("ERROR".encode('UTF-8')) @@ -112,7 +110,6 @@ class Server: file = self.executor.getFileInCurrentDirectory(firstParam) self.networkInstance.sendMessage(file) self.networkInstance.sendMessage("EOF".encode('UTF-8')) - #TODO varj OK vagy ERROR uzenetre except: self.networkInstance.sendMessage("ERROR".encode('UTF-8')) else: