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:
parent
20f2799938
commit
5f6bc65bb3
@ -33,7 +33,6 @@
|
|||||||
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 FileStatus[] listStatus(Path f) throws IOException {
|
|||||||
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];
|
||||||
|
Loading…
Reference in New Issue
Block a user