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 sz...@apache.org on 2012/03/15 23:36:00 UTC

svn commit: r1301250 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/fs/shell/PathData.java

Author: szetszwo
Date: Thu Mar 15 22:36:00 2012
New Revision: 1301250

URL: http://svn.apache.org/viewvc?rev=1301250&view=rev
Log:
HADOOP-8173. FsShell needs to handle quoted metachars.  Contributed by Daryn Sharp

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1301250&r1=1301249&r2=1301250&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Thu Mar 15 22:36:00 2012
@@ -373,6 +373,9 @@ Release 0.23.2 - UNRELEASED 
     HADOOP-8164. Back slash as path separator is handled for Windows only.
     (Daryn Sharp via suresh)
 
+    HADOOP-8173. FsShell needs to handle quoted metachars.  (Daryn Sharp via
+    szetszwo)
+
 Release 0.23.1 - 2012-02-17 
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java?rev=1301250&r1=1301249&r2=1301250&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java Thu Mar 15 22:36:00 2012
@@ -36,7 +36,6 @@ import org.apache.hadoop.fs.shell.PathEx
 import org.apache.hadoop.fs.shell.PathExceptions.PathIsDirectoryException;
 import org.apache.hadoop.fs.shell.PathExceptions.PathIsNotDirectoryException;
 import org.apache.hadoop.fs.shell.PathExceptions.PathNotFoundException;
-import org.apache.hadoop.io.Writable;
 
 /**
  * Encapsulates a Path (path), its FileStatus (stat), and its FileSystem (fs).
@@ -267,6 +266,8 @@ public class PathData implements Compara
     PathData[] items = null;
     
     if (stats == null) {
+      // remove any quoting in the glob pattern
+      pattern = pattern.replaceAll("\\\\(.)", "$1");
       // not a glob & file not found, so add the path with a null stat
       items = new PathData[]{ new PathData(fs, pattern, null) };
     } else {