You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ad...@apache.org on 2002/10/25 13:02:44 UTC

cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider AbstractFileObject.java

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>