This commit is contained in:
parent
df79776ede
commit
3e0afb0d45
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user