ソースを参照

commit 48b90e76fa2d1e2eda9fe19f299e2e5dae27d19e
Author: Hairong Kuang <hairong@ucdev21.inktomisearch.com>
Date: Sat Feb 27 01:44:54 2010 +0000

revert the change made by HDFS:6569

+++ b/YAHOO-CHANGES.txt


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077237 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 年 前
コミット
f0bed15744
1 ファイル変更3 行追加0 行削除
  1. 3 0
      src/core/org/apache/hadoop/fs/FsShell.java

+ 3 - 0
src/core/org/apache/hadoop/fs/FsShell.java

@@ -346,6 +346,9 @@ public class FsShell extends Configured implements Tool {
     new DelayedExceptionThrowing() {
       @Override
       void process(Path p, FileSystem srcFs) throws IOException {
+        if (srcFs.getFileStatus(p).isDir()) {
+          throw new IOException("Source must be a file.");
+        }
         printToStdout(srcFs.open(p));
       }
     }.globAndProcess(srcPattern, getSrcFileSystem(srcPattern, verifyChecksum));