changeset 21:8c6302226917

Use relative paths.
author Mikhail Kryshen <mikhail@kryshen.net>
date Wed, 22 Apr 2009 01:48:11 +0400
parents fe2a094f4509
children 1bd3a6740cfb
files src/kryshen/tema/FunctionDataParser.java src/kryshen/tema/GlobalContext.java
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/src/kryshen/tema/FunctionDataParser.java	Tue Apr 21 20:49:53 2009 +0400
     1.2 +++ b/src/kryshen/tema/FunctionDataParser.java	Wed Apr 22 01:48:11 2009 +0400
     1.3 @@ -205,7 +205,11 @@
     1.4          
     1.5          if (file.isAbsolute())
     1.6              return file;
     1.7 -        
     1.8 -        return new File(tp.getContext().getBaseDirectory(), path);
     1.9 +
    1.10 +        File base = tp.getContext().getBaseDirectory();
    1.11 +
    1.12 +        return base.getPath().isEmpty()
    1.13 +                ? new File(path)
    1.14 +                : new File(base, path);
    1.15      }
    1.16  }
     2.1 --- a/src/kryshen/tema/GlobalContext.java	Tue Apr 21 20:49:53 2009 +0400
     2.2 +++ b/src/kryshen/tema/GlobalContext.java	Wed Apr 22 01:48:11 2009 +0400
     2.3 @@ -37,7 +37,7 @@
     2.4  class GlobalContext extends Context {    
     2.5      
     2.6      GlobalContext() {
     2.7 -        super(new File(System.getProperty("user.dir")));
     2.8 +        super(new File(""));
     2.9          
    2.10          // Register all standard functions.
    2.11          // TODO: arithmetics