소스 검색

HADOOP-1115. Fix bug where FsShell copyToLocal doesn't copy directories. Contributed by Hairong Kuang.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@518049 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 18 년 전
부모
커밋
8de1ddeb04
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      CHANGES.txt
  2. 1 1
      src/java/org/apache/hadoop/fs/ChecksumFileSystem.java

+ 3 - 0
CHANGES.txt

@@ -52,6 +52,9 @@ Trunk (unreleased changes)
 15. HADOOP-1099.  Fix NullPointerException in JobInProgress.
     (Gautam Kowshik via tomwhite)
 
+16. HADOOP-1115.  Fix bug where FsShell copyToLocal doesn't
+    copy directories.  (Hairong Kuang via tomwhite)
+
 
 Release 0.12.0 - 2007-03-02
 

+ 1 - 1
src/java/org/apache/hadoop/fs/ChecksumFileSystem.java

@@ -605,7 +605,7 @@ public abstract class ChecksumFileSystem extends FilterFileSystem {
     } else {
       Path[] srcs = listPaths(src);
       for (Path srcFile : srcs) {
-        copyToLocalFile(srcFile, dst, copyCrc);
+        copyToLocalFile(srcFile, new Path(dst, srcFile.getName()), copyCrc);
       }
     }
   }