1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-29 16:50:10 +02:00

Fix for IllegalArgumentException on pathing

This commit is contained in:
Kleptoc
2022-05-03 12:01:07 -07:00
committed by soloturn
parent 8b2304d491
commit 827cc13398

View File

@@ -322,7 +322,12 @@ public class Utils {
* @return saveAs in relation to the CWD * @return saveAs in relation to the CWD
*/ */
public static String removeCWD(Path saveAs) { public static String removeCWD(Path saveAs) {
return saveAs.relativize(Paths.get(".").toAbsolutePath()).toString(); try {
return saveAs.relativize(Paths.get(".").toAbsolutePath()).toString();
}
catch (IllegalArgumentException e) {
return saveAs.toString();
}
} }
/** /**