From 76d1905807286574bc319f9bf8855ef0660532c3 Mon Sep 17 00:00:00 2001 From: noesterle Date: Thu, 20 Oct 2022 23:46:43 -0400 Subject: [PATCH] Fixed relative path issue. Relative path was being made from subfolder to working dir, now goes from working dir to subfolder. --- src/main/java/com/rarchives/ripme/utils/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/utils/Utils.java b/src/main/java/com/rarchives/ripme/utils/Utils.java index e15dd9cc..e24677ef 100644 --- a/src/main/java/com/rarchives/ripme/utils/Utils.java +++ b/src/main/java/com/rarchives/ripme/utils/Utils.java @@ -323,7 +323,7 @@ public class Utils { */ public static String removeCWD(Path saveAs) { try { - return saveAs.relativize(Paths.get(".").toAbsolutePath()).toString(); + return Paths.get(".").toAbsolutePath().relativize(saveAs).toString(); } catch (IllegalArgumentException e) { return saveAs.toString();