diff --git a/src/main/java/org/gcube/data/access/storagehub/fs/PathUtils.java b/src/main/java/org/gcube/data/access/storagehub/fs/PathUtils.java index 9b669e8..dc88a71 100644 --- a/src/main/java/org/gcube/data/access/storagehub/fs/PathUtils.java +++ b/src/main/java/org/gcube/data/access/storagehub/fs/PathUtils.java @@ -33,9 +33,7 @@ public class PathUtils { while (path.substring(path.length() - 1).equals("/")) { path = path.substring(0, path.length() - 1); } - if (path.isEmpty()) { - return ""; - } + return path.substring(path.lastIndexOf("/") + 1); } diff --git a/src/main/java/org/gcube/data/access/storagehub/fs/StorageHubFS.java b/src/main/java/org/gcube/data/access/storagehub/fs/StorageHubFS.java index 46892d2..a0efa3b 100644 --- a/src/main/java/org/gcube/data/access/storagehub/fs/StorageHubFS.java +++ b/src/main/java/org/gcube/data/access/storagehub/fs/StorageHubFS.java @@ -11,7 +11,6 @@ import org.cache2k.Cache; import org.cache2k.Cache2kBuilder; import org.gcube.common.security.AuthorizedTasks; import org.gcube.common.security.providers.SecretManagerProvider; -import org.gcube.common.security.secrets.GCubeSecret; import org.gcube.common.security.secrets.Secret; import org.gcube.common.security.secrets.UmaTokenSecret; import org.gcube.common.storagehub.client.dsl.ContainerType;