diff --git a/CHANGES.txt b/CHANGES.txt index e2bcbc714eb..c2707b098dd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/src/java/org/apache/hadoop/fs/HarFileSystem.java b/src/java/org/apache/hadoop/fs/HarFileSystem.java index 584b653927d..e54b8699408 100644 --- a/src/java/org/apache/hadoop/fs/HarFileSystem.java +++ b/src/java/org/apache/hadoop/fs/HarFileSystem.java @@ -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) {