소스 검색

Revert "HADOOP-12718. Incorrect error message by fs -put local dir without permission. (John Zhuge via Yongjun Zhang)"

This reverts commit 62206dd2edcc53dbfbae30a524c21e7eb828bd0e.

Conflicts:
	hadoop-common-project/hadoop-common/CHANGES.txt
Chris Nauroth 9 년 전
부모
커밋
55658dcaa3
1개의 변경된 파일0개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 5
      hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java

+ 0 - 5
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java

@@ -33,7 +33,6 @@ import java.io.OutputStream;
 import java.io.FileDescriptor;
 import java.io.FileDescriptor;
 import java.net.URI;
 import java.net.URI;
 import java.nio.ByteBuffer;
 import java.nio.ByteBuffer;
-import java.nio.file.AccessDeniedException;
 import java.nio.file.Files;
 import java.nio.file.Files;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.nio.file.attribute.BasicFileAttributes;
@@ -459,10 +458,6 @@ public class RawLocalFileSystem extends FileSystem {
     if (localf.isDirectory()) {
     if (localf.isDirectory()) {
       String[] names = localf.list();
       String[] names = localf.list();
       if (names == null) {
       if (names == null) {
-        if (!localf.canRead()) {
-          throw new AccessDeniedException("cannot open directory " + f +
-              ": Permission denied");
-        }
         return null;
         return null;
       }
       }
       results = new FileStatus[names.length];
       results = new FileStatus[names.length];