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

This reverts commit 97056c3355.

Conflicts:
	hadoop-common-project/hadoop-common/CHANGES.txt
This commit is contained in:
Chris Nauroth 2016-06-17 23:50:22 -07:00
parent 20f2799938
commit 5f6bc65bb3
1 changed files with 0 additions and 5 deletions

View File

@ -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;
@ -472,10 +471,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];