Skip to content

Commit 012a5a3

Browse files
committed
Merge pull request #104 from childsb/bz1105694
Throw a better error message if attempting to access a directory without...
2 parents 4c9e92f + c230b23 commit 012a5a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/apache/hadoop/fs/glusterfs/GlusterVolume.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ public FileStatus[] listStatus(Path f) throws IOException {
289289
return new FileStatus[] {
290290
new GlusterFileStatus(localf, getDefaultBlockSize(), this) };
291291
}
292+
293+
if(localf.isDirectory() && !localf.canRead()){
294+
throw new IOException("Access denied : " + localf.getPath());
295+
}
292296

293297
File[] names = localf.listFiles();
294298
if (names == null) {

0 commit comments

Comments
 (0)