From e381af1e1ecce489a28f7d63363908ec2dd8b551 Mon Sep 17 00:00:00 2001 From: Mahadev Konar Date: Wed, 24 Mar 2010 17:51:38 +0000 Subject: [PATCH] HADOOP-6645. Re: Bugs on listStatus for HarFileSystem (rodrigo via mahadev) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@927134 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/fs/HarFileSystem.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c2707b098dd..537b889fa4b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -295,6 +295,9 @@ Trunk (unreleased changes) HADOOP-6645. Bugs on listStatus for HarFileSystem (rodrigo via mahadev) + HADOOP-6645. Re: 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 e54b8699408..523e9c1d160 100644 --- a/src/java/org/apache/hadoop/fs/HarFileSystem.java +++ b/src/java/org/apache/hadoop/fs/HarFileSystem.java @@ -409,7 +409,10 @@ public class HarFileSystem extends FilterFileSystem { LineReader aLin; long read = 0; aLin = new LineReader(aIn, getConf()); - String parentString = parent.getName() + Path.SEPARATOR; + String parentString = parent.getName(); + if (!parentString.endsWith(Path.SEPARATOR)){ + parentString += Path.SEPARATOR; + } Path harPath = new Path(parentString); int harlen = harPath.depth(); Text line = new Text();