From 35de12b8ed799fd0cbd2a3bfd12e1cb7e286f516 Mon Sep 17 00:00:00 2001 From: Mahadev Konar Date: Tue, 23 Mar 2010 01:16:03 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 2 ++ src/java/org/apache/hadoop/fs/HarFileSystem.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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) {