svn merge -c 1301250 from trunk for HADOOP-8173.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1301251 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2012-03-15 22:37:55 +00:00
parent 003ea1e226
commit 45c31a50fd
2 changed files with 5 additions and 1 deletions

View File

@ -273,6 +273,9 @@ Release 0.23.2 - UNRELEASED
HADOOP-8164. Back slash as path separator is handled for Windows only. HADOOP-8164. Back slash as path separator is handled for Windows only.
(Daryn Sharp via suresh) (Daryn Sharp via suresh)
HADOOP-8173. FsShell needs to handle quoted metachars. (Daryn Sharp via
szetszwo)
Release 0.23.1 - 2012-02-17 Release 0.23.1 - 2012-02-17
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -36,7 +36,6 @@ import org.apache.hadoop.fs.shell.PathExceptions.PathIOException;
import org.apache.hadoop.fs.shell.PathExceptions.PathIsDirectoryException; import org.apache.hadoop.fs.shell.PathExceptions.PathIsDirectoryException;
import org.apache.hadoop.fs.shell.PathExceptions.PathIsNotDirectoryException; import org.apache.hadoop.fs.shell.PathExceptions.PathIsNotDirectoryException;
import org.apache.hadoop.fs.shell.PathExceptions.PathNotFoundException; 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). * Encapsulates a Path (path), its FileStatus (stat), and its FileSystem (fs).
@ -267,6 +266,8 @@ public class PathData implements Comparable<PathData> {
PathData[] items = null; PathData[] items = null;
if (stats == 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 // not a glob & file not found, so add the path with a null stat
items = new PathData[]{ new PathData(fs, pattern, null) }; items = new PathData[]{ new PathData(fs, pattern, null) };
} else { } else {