diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/FileItem.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/FileItem.java index 474a3c431..f2a90c47f 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/FileItem.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/FileItem.java @@ -80,7 +80,7 @@ public class FileItem extends BorderPane { Path given = Paths.get(path).toAbsolutePath(); if (isConvertToRelativePath()) { try { - return Paths.get(".").toAbsolutePath().relativize(given).normalize().toString(); + return Paths.get(".").normalize().toAbsolutePath().relativize(given).normalize().toString(); } catch (IllegalArgumentException e) { // the given path can't be relativized against current path }