Loading src/main/java/it/inaf/ia2/transfer/service/ArchiveService.java +4 −3 Original line number Diff line number Diff line Loading @@ -239,15 +239,16 @@ public class ArchiveService { List<String> vosPaths = entryDescriptors.stream().map(ed -> ed.getVosPath()) .collect(Collectors.toList()); /* if (vosPaths.size() == 1) { String vosPath = vosPaths.get(0); return vosPath.substring(0, vosPath.lastIndexOf("/")); } }*/ String commonParent = null; for (String vosPath : vosPaths) { if (commonParent == null) { commonParent = vosPath; commonParent = vosPath.substring(0, vosPath.lastIndexOf("/")); } else { StringBuilder newCommonParent = new StringBuilder(); boolean same = true; Loading @@ -262,7 +263,7 @@ public class ArchiveService { commonParent = newCommonParent.toString(); } } return commonParent; return commonParent.substring(0, commonParent.lastIndexOf("/")); } private abstract class ArchiveHandler<O extends OutputStream, E> implements AutoCloseable { Loading Loading
src/main/java/it/inaf/ia2/transfer/service/ArchiveService.java +4 −3 Original line number Diff line number Diff line Loading @@ -239,15 +239,16 @@ public class ArchiveService { List<String> vosPaths = entryDescriptors.stream().map(ed -> ed.getVosPath()) .collect(Collectors.toList()); /* if (vosPaths.size() == 1) { String vosPath = vosPaths.get(0); return vosPath.substring(0, vosPath.lastIndexOf("/")); } }*/ String commonParent = null; for (String vosPath : vosPaths) { if (commonParent == null) { commonParent = vosPath; commonParent = vosPath.substring(0, vosPath.lastIndexOf("/")); } else { StringBuilder newCommonParent = new StringBuilder(); boolean same = true; Loading @@ -262,7 +263,7 @@ public class ArchiveService { commonParent = newCommonParent.toString(); } } return commonParent; return commonParent.substring(0, commonParent.lastIndexOf("/")); } private abstract class ArchiveHandler<O extends OutputStream, E> implements AutoCloseable { Loading