diff --git a/opal-core-ws/src/main/java/org/obiba/opal/web/FilesResource.java b/opal-core-ws/src/main/java/org/obiba/opal/web/FilesResource.java index 8cbb0c69b0..cc99f225ea 100644 --- a/opal-core-ws/src/main/java/org/obiba/opal/web/FilesResource.java +++ b/opal-core-ws/src/main/java/org/obiba/opal/web/FilesResource.java @@ -97,7 +97,7 @@ public Response getFileSystemRootDetails() throws IOException { @NoAuthorization public Response getFileDetails(@PathParam("path") String path) throws IOException { FileObject file = resolveFileInFileSystem(path); - if (!file.getParent().isReadable() || !file.exists()) { + if (file.getParent() != null && !file.getParent().isReadable() || !file.exists()) { return getPathNotExistResponse("/" + path); } if (file.getType() == FileType.FILE) {