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

This reverts commit 62206dd2ed.

Conflicts:
	hadoop-common-project/hadoop-common/CHANGES.txt
This commit is contained in:
Chris Nauroth 2016-06-17 23:51:27 -07:00
parent 3f2d2cd0a1
commit 55658dcaa3
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];