فهرست منبع

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 file = new File(dirs[index], path);
       File dir = file.getParentFile();
       File dir = file.getParentFile();
       if (dir.exists() || dir.mkdirs()) {
       if (dir.exists() || dir.mkdirs()) {
-        return file;
+        return file.getAbsoluteFile();
       }
       }
     }
     }
     throw new IOException("No valid local directories in property: "+dirsProp);
     throw new IOException("No valid local directories in property: "+dirsProp);