Author: ngn
Date: Fri Dec 5 13:42:34 2008
New Revision: 723881
URL: http://svn.apache.org/viewvc?rev=723881&view=rev
Log:
Fixed bug where multiple replies would be sent if the timestamp can not be
changed.
Modified:
mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/impl/MFMT.java
Modified:
mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/impl/MFMT.java
URL:
http://svn.apache.org/viewvc/mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/impl/MFMT.java?rev=723881&r1=723880&r2=723881&view=diff
==============================================================================
---
mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/impl/MFMT.java
(original)
+++
mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/impl/MFMT.java
Fri Dec 5 13:42:34 2008
@@ -129,16 +129,15 @@
}
// check if we can set date and retrieve the actual date stored
for the file.
- if (file.setLastModified(time.getTime())) {
- // timestamp=DateUtils.getFtpDate(time.getTime());
- }
- // we couldn't set the date.
- else{
+ if (!file.setLastModified(time.getTime())) {
+ // we couldn't set the date, possiblt the file was locked
session.write(LocalizedFtpReply.translate(session, request,
context,
FtpReply.REPLY_450_REQUESTED_FILE_ACTION_NOT_TAKEN,
"MFMT",
fileName));
+ return;
}
- // all checks okay, lets go
+
+ // all checks okay, lets go
session
.write(LocalizedFtpReply
.translate(