Browse Source

Always return an absolute pathname for local files. This fixes
problems on Windows, where a path specified with "/foo" in a config
file is sometimes treated as a relative path.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@389633 13f79535-47bb-0310-9956-ffa450edef68

Doug Cutting 19 years ago
parent
commit
27a97ef6d3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/java/org/apache/hadoop/conf/Configuration.java

+ 1 - 1
src/java/org/apache/hadoop/conf/Configuration.java

@@ -276,7 +276,7 @@ public class Configuration {
       File file = new File(dirs[index], path);
       File dir = file.getParentFile();
       if (dir.exists() || dir.mkdirs()) {
-        return file;
+        return file.getAbsoluteFile();
       }
     }
     throw new IOException("No valid local directories in property: "+dirsProp);