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.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;
@ -472,10 +471,6 @@ public FileStatus[] listStatus(Path f) throws IOException {
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];