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:
@@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user