diff --git a/core/src/main/java/io/xpipe/core/store/FileNames.java b/core/src/main/java/io/xpipe/core/store/FileNames.java index 48b3fb868..edbac0588 100644 --- a/core/src/main/java/io/xpipe/core/store/FileNames.java +++ b/core/src/main/java/io/xpipe/core/store/FileNames.java @@ -137,7 +137,7 @@ public class FileNames { } public static String relativize(String from, String to) { - return normalize(to).substring(normalize(from).length()); + return normalize(to).substring(FileNames.toDirectory(normalize(from)).length()); } public static String normalize(String file) {