commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider AbstractFileObject.java
Date Fri, 25 Oct 2002 11:02:44 GMT
adammurdoch    2002/10/25 04:02:44

  Modified:    vfs/src/java/org/apache/commons/vfs/provider
                        AbstractFileObject.java
  Log:
  Don't assume the root file of a file system exists.
  
  Revision  Changes    Path
  1.15      +7 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
  
  Index: AbstractFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AbstractFileObject.java	25 Oct 2002 03:59:09 -0000	1.14
  +++ AbstractFileObject.java	25 Oct 2002 11:02:44 -0000	1.15
  @@ -77,7 +77,7 @@
   import org.apache.commons.vfs.Selectors;
   
   /**
  - * A partial file object implementation.
  + * A partial file object implementation.   
    *
    * @todo Chop this class up - move all the protected methods to several
    *       interfaces, so that structure and content can be separately overridden.
  @@ -415,7 +415,12 @@
               }
               else
               {
  -                return getParent().isWriteable();
  +                final FileObject parent = getParent();
  +                if ( parent != null )
  +                {
  +                    return parent.isWriteable();
  +                }
  +                return true;
               }
           }
           catch ( final Exception exc )
  
  
  

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


Mime
View raw message