commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1200015 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java src/changes/changes.xml
Date Wed, 09 Nov 2011 22:45:41 GMT
Author: ggregory
Date: Wed Nov  9 22:45:41 2011
New Revision: 1200015

URL: http://svn.apache.org/viewvc?rev=1200015&view=rev
Log:
[VFS-382] SFTP getChildren() does not fail when called on a file.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
    commons/proper/vfs/trunk/src/changes/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java?rev=1200015&r1=1200014&r2=1200015&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
Wed Nov  9 22:45:41 2011
@@ -300,6 +300,10 @@ public class SftpFileObject extends Abst
     @Override
     protected FileObject[] doListChildrenResolved() throws Exception
     {
+        // should not require a round-trip because type is already set.
+        if (this.isFile()) {
+            return null;
+        }
         // List the contents of the folder
         Vector<?> vector = null;
         final ChannelSftp channel = fileSystem.getChannel();

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1200015&r1=1200014&r2=1200015&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Wed Nov  9 22:45:41 2011
@@ -23,6 +23,12 @@
 
   <body>
     <release version="2.1" date="TBD" description="">
+      <action issue="VFS-382" dev="ggregory" type="fix">
+        SFTP getChildren() does not fail when called on a file.
+      </action>
+      <action issue="VFS-381" dev="ggregory" type="add">
+        Iterate over a FileObject using the Java "foreach" statement, to provide all descendents
of a FileObject.
+      </action>
       <action issue="VFS-380" dev="ggregory" type="fix">
         FTP connect.error message used instead of SFTP connect.error message.
       </action>
@@ -47,6 +53,9 @@
       <action issue="VFS-372" dev="ggregory" type="add">
         Add constructors FileDepthSelector() and FileDepthSelector(int).
       </action>
+      <action issue="VFS-371" dev="ggregory" type="add">
+        Add FileObject API deleteAll().
+      </action>
       <action issue="VFS-370" dev="ggregory" type="add">
         Add a FileExtensionSelector class.
       </action>



Mime
View raw message