copypaste went wild
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-04-26 13:50:28 +02:00
parent df79776ede
commit 3e0afb0d45
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -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: