fixd
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-04-25 18:20:55 +02:00
parent f345d4b961
commit b6b3dd3a35
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -94,11 +94,10 @@ class Server:
if secondParam != "": if secondParam != "":
self.networkInstance.sendMessage("ERROR".encode('UTF-8')) self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
else: else:
fileName = firstParam
fileMessage = self.networkInstance.recieveMessage() fileMessage = self.networkInstance.recieveMessage()
eof = self.networkInstance.recieveEncryptedMessage().decode('UTF-8') eof = self.networkInstance.recieveMessage().decode('UTF-8')
if eof == "EOF": if eof == "EOF":
self.executor.putFileInCurrentDirectory(fileName, fileMessage) self.executor.putFileInCurrentDirectory(firstParam, fileMessage)
self.networkInstance.sendMessage("OK".encode('UTF-8')) self.networkInstance.sendMessage("OK".encode('UTF-8'))
else: else:
self.networkInstance.sendMessage("ERROR".encode('UTF-8')) self.networkInstance.sendMessage("ERROR".encode('UTF-8'))