Fix #81
This commit is contained in:
parent
fbd5ec970b
commit
5e5a774e34
1 changed files with 6 additions and 3 deletions
|
@ -24,9 +24,12 @@ import java.nio.file.Paths;
|
||||||
|
|
||||||
public class FilesHelper {
|
public class FilesHelper {
|
||||||
public static String getRealFolder(String location){
|
public static String getRealFolder(String location){
|
||||||
Path locationAsPath = Paths.get(location);
|
try{
|
||||||
if (Files.notExists(locationAsPath) || Files.isRegularFile(locationAsPath))
|
Path locationAsPath = Paths.get(location);
|
||||||
return System.getProperty("user.home");
|
if (Files.notExists(locationAsPath) || Files.isRegularFile(locationAsPath))
|
||||||
|
return System.getProperty("user.home");
|
||||||
|
}
|
||||||
|
catch (Exception ignored){}
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue