浏览代码

Un-escape containing jar's path, which is URL-encoded. This fixes
things primarily on Windows, where paths are likely to contain spaces.


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

Doug Cutting 19 年之前
父节点
当前提交
3c4edc2643
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/java/org/apache/hadoop/mapred/JobConf.java

+ 2 - 0
src/java/org/apache/hadoop/mapred/JobConf.java

@@ -26,6 +26,7 @@ import java.util.Collections;
 import java.util.Enumeration;
 
 import java.net.URL;
+import java.net.URLDecoder;
 
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.conf.Configuration;
@@ -309,6 +310,7 @@ public class JobConf extends Configuration {
           if (toReturn.startsWith("file:")) {
             toReturn = toReturn.substring("file:".length());
           }
+          toReturn = URLDecoder.decode(toReturn, "UTF-8");
           return toReturn.replaceAll("!.*$", "");
         }
       }