You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2006/03/29 02:01:48 UTC

svn commit: r389633 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java

Author: cutting
Date: Tue Mar 28 16:01:47 2006
New Revision: 389633

URL: http://svn.apache.org/viewcvs?rev=389633&view=rev
Log:
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.

Modified:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java?rev=389633&r1=389632&r2=389633&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java Tue Mar 28 16:01:47 2006
@@ -276,7 +276,7 @@
       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);



Re: svn commit: r389633 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java

Posted by Andrzej Bialecki <ab...@getopt.org>.
cutting@apache.org wrote:
> Author: cutting
> Date: Tue Mar 28 16:01:47 2006
> New Revision: 389633
>
> URL: http://svn.apache.org/viewcvs?rev=389633&view=rev
> Log:
> 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.
>   

I confirm that this fixes the issue for me. Thanks!

-- 
Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com