Skip to content
Snippets Groups Projects
Verified Commit 42e48560 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: fix url in FileSystemResource

parent 1ad55e53
No related branches found
No related tags found
1 merge request!76Draft: ENH: file system: link
Pipeline #47557 failed
......@@ -92,13 +92,13 @@ public class FileSystemResource extends AbstractCaosDBServerResource {
file = entity.getFSODescriptor();
if (file.getObjectType() == ObjectType.DIRECTORY) {
String url = getUtils().getServerRootURI() + "/FileSystem/" + path.toString();
String url = getUtils().getServerRootURI() + "/FileSystem/" + file.getPath().toString();
if (!url.endsWith(Path.DEFAULT_PATH_SEPARATOR)) {
url = url + Path.DEFAULT_PATH_SEPARATOR;
}
final Element folder = new Element("dir");
folder.setAttribute("path", Path.DEFAULT_PATH_SEPARATOR + file.getPath().toString());
folder.setAttribute("name", path.isEmpty() ? "/" : file.getName());
folder.setAttribute("name", file.getPath().isEmpty() ? "/" : file.getName());
folder.setAttribute("url", url);
for (final VirtualFSODescriptorInterface child : file.listChildren()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment