This commit is contained in:
parent
df79776ede
commit
3e0afb0d45
@ -73,8 +73,7 @@ class Server:
|
|||||||
if secondParam != "" or firstParam != "":
|
if secondParam != "" or firstParam != "":
|
||||||
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
||||||
else:
|
else:
|
||||||
self.executor.getCurrentDirectory()
|
self.networkInstance.sendMessage(self.executor.getCurrentDirectory().encode('UTF-8'))
|
||||||
self.networkInstance.sendMessage("OK".encode('UTF-8'))
|
|
||||||
elif command == "CWD":
|
elif command == "CWD":
|
||||||
if secondParam != "":
|
if secondParam != "":
|
||||||
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
||||||
@ -85,8 +84,7 @@ class Server:
|
|||||||
if secondParam != "" or firstParam != "":
|
if secondParam != "" or firstParam != "":
|
||||||
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
||||||
else:
|
else:
|
||||||
self.executor.listCurrentDirectoryContent()
|
self.networkInstance.sendMessage(self.executor.listCurrentDirectoryContent().encode('UTF-8'))
|
||||||
self.networkInstance.sendMessage("OK".encode('UTF-8'))
|
|
||||||
elif command == "RMF":
|
elif command == "RMF":
|
||||||
if secondParam != "":
|
if secondParam != "":
|
||||||
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
||||||
@ -112,7 +110,6 @@ class Server:
|
|||||||
file = self.executor.getFileInCurrentDirectory(firstParam)
|
file = self.executor.getFileInCurrentDirectory(firstParam)
|
||||||
self.networkInstance.sendMessage(file)
|
self.networkInstance.sendMessage(file)
|
||||||
self.networkInstance.sendMessage("EOF".encode('UTF-8'))
|
self.networkInstance.sendMessage("EOF".encode('UTF-8'))
|
||||||
#TODO varj OK vagy ERROR uzenetre
|
|
||||||
except:
|
except:
|
||||||
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user