HADOOP-6645. Bugs on listStatus for HarFileSystem (rodrigo via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@926421 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mahadev Konar 2010-03-23 01:16:03 +00:00
parent 0485fe23ba
commit 35de12b8ed
2 changed files with 4 additions and 2 deletions

View File

@ -293,6 +293,8 @@ Trunk (unreleased changes)
HADOOP-6175. Incorrect version compilation with es_ES.ISO8859-15 locale
on Solaris 10. (Urko Benito via tomwhite)
HADOOP-6645. Bugs on listStatus for HarFileSystem (rodrigo via mahadev)
Release 0.21.0 - Unreleased
INCOMPATIBLE CHANGES

View File

@ -409,7 +409,7 @@ public class HarFileSystem extends FilterFileSystem {
LineReader aLin;
long read = 0;
aLin = new LineReader(aIn, getConf());
String parentString = parent.getName();
String parentString = parent.getName() + Path.SEPARATOR;
Path harPath = new Path(parentString);
int harlen = harPath.depth();
Text line = new Text();
@ -417,7 +417,7 @@ public class HarFileSystem extends FilterFileSystem {
int tmp = aLin.readLine(line);
read += tmp;
String lineFeed = line.toString();
String child = lineFeed.substring(0, lineFeed.indexOf(" "));
String child = decodeFileName(lineFeed.substring(0, lineFeed.indexOf(" ")));
if ((child.startsWith(parentString))) {
Path thisPath = new Path(child);
if (thisPath.depth() == harlen + 1) {