瀏覽代碼

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 年之前
父節點
當前提交
27a97ef6d3
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);