From 55658dcaa3b9389093784148e7b9ecc83720a5b0 Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Fri, 17 Jun 2016 23:51:27 -0700 Subject: [PATCH] Revert "HADOOP-12718. Incorrect error message by fs -put local dir without permission. (John Zhuge via Yongjun Zhang)" This reverts commit 62206dd2edcc53dbfbae30a524c21e7eb828bd0e. 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 7e6a2662062..fc6a91a0c91 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; @@ -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];