commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1642389 - in /commons/proper/net/trunk/src: changes/changes.xml main/java/org/apache/commons/net/ftp/FTPClient.java
Date Sat, 29 Nov 2014 01:27:52 GMT
Author: sebb
Date: Sat Nov 29 01:27:52 2014
New Revision: 1642389

URL: http://svn.apache.org/r1642389
Log:
NET-558 - getModificationTime(<filename>) returns complete received line including response
code

Modified:
    commons/proper/net/trunk/src/changes/changes.xml
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java

Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1642389&r1=1642388&r2=1642389&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/net/trunk/src/changes/changes.xml [utf-8] Sat Nov 29 01:27:52 2014
@@ -68,6 +68,9 @@ This is mainly a bug-fix release. See fu
   IMAPExportMbox (example app) allows IMAP folders to be exported into an mbox file.
   This is the inverse of the IMAPImportMbox example added previously
         ">
+            <action issue="NET-558" type="fix" dev="sebb" due-to="Ralph Becker">
+            FTPClient.getModificationTime(filename) returns complete received line including
response code
+            </action>
             <action issue="NET-556" type="update" dev="sebb" due-to="Andy Rosa">
             Make SubnetInfo.isInRange(int) public
             </action>

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1642389&r1=1642388&r2=1642389&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Sat Nov
29 01:27:52 2014
@@ -3426,7 +3426,7 @@ implements Configurable
 
 
     /**
-     * Issue the FTP MDTM command (not supported by all servers to retrieve the last
+     * Issue the FTP MDTM command (not supported by all servers) to retrieve the last
      * modification time of a file. The modification string should be in the
      * ISO 3077 form "YYYYMMDDhhmmss(.xxx)?". The timestamp represented should also be in
      * GMT, but not all FTP servers honour this.
@@ -3438,7 +3438,7 @@ implements Configurable
      */
     public String getModificationTime(String pathname) throws IOException {
         if (FTPReply.isPositiveCompletion(mdtm(pathname))) {
-            return getReplyString();
+            return getReplyString().substring(4); // skip the return code (e.g. 213) and
the space
         }
         return null;
     }



Mime
View raw message