Browse Source

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

This reverts commit a1f913fb6e917f90d9492c78a30b380096ddb3db.

Conflicts:
	hadoop-common-project/hadoop-common/CHANGES.txt
Chris Nauroth 9 years ago
parent
commit
b726b5c52c

+ 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];