Skip to content
Snippets Groups Projects
Commit 82c7f740 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Fixed minor issue in ArchiveService

parent 3870ea62
No related branches found
No related tags found
No related merge requests found
Pipeline #2114 passed
...@@ -182,7 +182,8 @@ public class ArchiveService { ...@@ -182,7 +182,8 @@ public class ArchiveService {
} else { } else {
StringBuilder newCommonParent = new StringBuilder(); StringBuilder newCommonParent = new StringBuilder();
boolean same = true; boolean same = true;
for (int i = 0; same && i < Math.min(commonParent.length(), vosPath.length()); i++) { int lastSlashPos = vosPath.lastIndexOf("/");
for (int i = 0; same && i < Math.min(commonParent.length(), vosPath.length()) && i <= lastSlashPos; i++) {
if (commonParent.charAt(i) == vosPath.charAt(i)) { if (commonParent.charAt(i) == vosPath.charAt(i)) {
newCommonParent.append(commonParent.charAt(i)); newCommonParent.append(commonParent.charAt(i));
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment