commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r424217 - /jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
Date Fri, 21 Jul 2006 07:49:59 GMT
Author: imario
Date: Fri Jul 21 00:49:59 2006
New Revision: 424217

URL: http://svn.apache.org/viewvc?rev=424217&view=rev
Log:
create file only if not exists - thanks to filip defoort for pointing it out

Modified:
    jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java

Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java?rev=424217&r1=424216&r2=424217&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 Jul 21 00:49:59 2006
@@ -775,8 +775,11 @@
         {
             try
             {
-                getOutputStream().close();
-                endOutput();
+                if (!exists())
+                {
+                    getOutputStream().close();
+                    endOutput();
+                }
             }
             catch (final RuntimeException re)
             {



---------------------------------------------------------------------
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