/[classpath]/classpath/java/io/File.java
ViewVC logotype

Diff of /classpath/java/io/File.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49.2.7 by gnu_andrew, Wed Nov 2 00:43:32 2005 UTC revision 1.49.2.8 by gnu_andrew, Sun Nov 27 21:00:37 2005 UTC
# Line 457  public class File implements Serializabl Line 457  public class File implements Serializabl
457          else          else
458            return drvDir;            return drvDir;
459        }        }
460        else if (path.equals(""))
461          return System.getProperty ("user.dir");
462      else      else
463        return System.getProperty ("user.dir") + separatorChar + path;        return System.getProperty ("user.dir") + separatorChar + path;
464    }    }
# Line 543  public class File implements Serializabl Line 545  public class File implements Serializabl
545    {    {
546      String prefix = null;      String prefix = null;
547      int nameSeqIndex = 0;      int nameSeqIndex = 0;
548        
549        if (path.equals(""))
550          return null;
551    
552      // The "prefix", if present, is the leading "/" on UNIX and      // The "prefix", if present, is the leading "/" on UNIX and
553      // either the drive specifier (e.g. "C:") or the leading "\\"      // either the drive specifier (e.g. "C:") or the leading "\\"
# Line 954  public class File implements Serializabl Line 959  public class File implements Serializabl
959    public URI toURI()    public URI toURI()
960    {    {
961      String abspath = getAbsolutePath();      String abspath = getAbsolutePath();
962          
963      if (isDirectory())      if (isDirectory() || path.equals(""))
964        abspath = abspath + separatorChar;        abspath = abspath + separatorChar;
965    
966      if (separatorChar == '\\')      if (separatorChar == '\\')

Legend:
Removed from v.1.49.2.7  
changed lines
  Added in v.1.49.2.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26