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

This reverts commit a1f913fb6e.

Conflicts:
	hadoop-common-project/hadoop-common/CHANGES.txt
This commit is contained in:
Chris Nauroth 2016-06-17 23:50:55 -07:00
parent 25be8105cd
commit b726b5c52c
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.net.URI;
import java.nio.ByteBuffer;
import java.nio.file.AccessDeniedException;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.attribute.BasicFileAttributes;
@ -459,10 +458,6 @@ public class RawLocalFileSystem extends FileSystem {
if (localf.isDirectory()) {
String[] names = localf.list();
if (names == null) {
if (!localf.canRead()) {
throw new AccessDeniedException("cannot open directory " + f +
": Permission denied");
}
return null;
}
results = new FileStatus[names.length];