commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r321295 - in /jakarta/commons/proper/vfs/trunk: RELEASE_NOTES.txt src/java/org/apache/commons/vfs/provider/AbstractFileObject.java src/test/org/apache/commons/vfs/provider/ftp/test/FtpProviderTestCase.java
Date Sat, 15 Oct 2005 05:42:30 GMT
Author: imario
Date: Fri Oct 14 22:42:19 2005
New Revision: 321295

URL: http://svn.apache.org/viewcvs?rev=321295&view=rev
Log:
enh: removed check for isWriteable in deleteSelf as its possible to delete a read-only file
if you have write-execute access to the directory.
Thanks to Guillermo Vasconcelos for reporting it.

ftp-test: use passive mode by default

Modified:
    jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt
    jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
    jakarta/commons/proper/vfs/trunk/src/test/org/apache/commons/vfs/provider/ftp/test/FtpProviderTestCase.java

Modified: jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt?rev=321295&r1=321294&r2=321295&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt (original)
+++ jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt Fri Oct 14 22:42:19 2005
@@ -1,3 +1,10 @@
+2005-11 comons-vfs 1.0 RC6
+
+core:
+removed check for isWriteable in deleteSelf as its possible to delete a read-only file
+if you have write-execute access to the directory
+
+
 2005-10-14 commons-vfs 1.0 RC5
 
 zip, jar, tar:

Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java?rev=321295&r1=321294&r2=321295&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
(original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
Fri Oct 14 22:42:19 2005
@@ -667,10 +667,12 @@
     {
         synchronized (this)
         {
+            /* Its possible to delete a read-only file if you have write-execute access to
the directory
             if (!isWriteable())
             {
                 throw new FileSystemException("vfs.provider/delete-read-only.error", name);
             }
+            */
 
             if (getType() == FileType.IMAGINARY)
             {

Modified: jakarta/commons/proper/vfs/trunk/src/test/org/apache/commons/vfs/provider/ftp/test/FtpProviderTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/test/org/apache/commons/vfs/provider/ftp/test/FtpProviderTestCase.java?rev=321295&r1=321294&r2=321295&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/test/org/apache/commons/vfs/provider/ftp/test/FtpProviderTestCase.java
(original)
+++ jakarta/commons/proper/vfs/trunk/src/test/org/apache/commons/vfs/provider/ftp/test/FtpProviderTestCase.java
Fri Oct 14 22:42:19 2005
@@ -18,8 +18,10 @@
 import junit.framework.Test;
 import org.apache.commons.vfs.FileObject;
 import org.apache.commons.vfs.FileSystemManager;
+import org.apache.commons.vfs.FileSystemOptions;
 import org.apache.commons.vfs.impl.DefaultFileSystemManager;
 import org.apache.commons.vfs.provider.ftp.FtpFileProvider;
+import org.apache.commons.vfs.provider.ftp.FtpFileSystemConfigBuilder;
 import org.apache.commons.vfs.test.AbstractProviderTestConfig;
 import org.apache.commons.vfs.test.ProviderTestConfig;
 import org.apache.commons.vfs.test.ProviderTestSuite;
@@ -55,6 +57,8 @@
     public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception
     {
         final String uri = System.getProperty("test.ftp.uri");
-        return manager.resolveFile(uri);
+        FileSystemOptions opts = new FileSystemOptions();
+        FtpFileSystemConfigBuilder.getInstance().setPassiveMode(opts, true);
+        return manager.resolveFile(uri, opts);
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message