diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java b/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java index b6d666d..7bb4435 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java @@ -188,7 +188,8 @@ public class CatalogueResolver { if(scopeBean.is(Type.VO)) { logger.info("It is a {} scope", Type.VO); logger.warn("The Catalogue can't work at {} level, I'm overriding the scope to {} level", Type.VO, Type.INFRASTRUCTURE); - fullScope = fullScope.substring(1, fullScope.indexOf("/")); //skypping the first slash + String[] splitScope = fullScope.split("/"); + fullScope = splitScope[1]; //THIS IS THE INFRASTRUCTURE SCOPE logger.info("Overriden the input scope {} with {} as type: {}", fullScope, Type.INFRASTRUCTURE, fullScope); }