Pavel Kostelnik created NET-545:
-----------------------------------
Summary: deleteFile always returns true
Key: NET-545
URL: https://issues.apache.org/jira/browse/NET-545
Project: Commons Net
Issue Type: Bug
Components: FTP
Affects Versions: 3.4
Environment: VsFTPd 2.0.5 @Oracle Enterise Linux
2.6.18-194.3.1.0.1.el5xen #1 SMP Thu May 6 20:22:34 EDT 2010 x86_64 x86_64
x86_64 GNU/Linux
Reporter: Pavel Kostelnik
The deleteFile always returns true, even if the file is not deleted.
result = ftpClient.deleteFile(targetDir+"/"+fileName);
--> the variable "result" is always true...
My test code is following:
boolean result = ftpClient.deleteFile(targetDir+"/"+fileName);
System.out.println(result); //THIS IS ALWAYS true, even if the file is not
deleted
System.out.println(ftpClient.getReplyString()); // reply string for PREVIOUS
operation is shown
int res = ftpClient.getReply(); // I have to call this to get the actual reply
for delete command
System.out.println(res+ "aadfasd"); //550
System.out.println(ftpClient.getReplyCode()); //550
System.out.println(ftpClient.getReplyString());//550 Delete operation failed.
--
This message was sent by Atlassian JIRA
(v6.2#6252)