From 5f6bc65bb31270f2b5dfdfd941a0568fc1f3337f Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Fri, 17 Jun 2016 23:50:22 -0700 Subject: [PATCH] Revert "HADOOP-12718. Incorrect error message by fs -put local dir without permission. (John Zhuge via Yongjun Zhang)" This reverts commit 97056c3355810a803f07baca89b89e2bf6bb7201. Conflicts: hadoop-common-project/hadoop-common/CHANGES.txt --- .../main/java/org/apache/hadoop/fs/RawLocalFileSystem.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java index 8ef83924f32..cc41f4a41e8 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java @@ -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; @@ -472,10 +471,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];