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){
|
||||||
|
try{
|
||||||
Path locationAsPath = Paths.get(location);
|
Path locationAsPath = Paths.get(location);
|
||||||
if (Files.notExists(locationAsPath) || Files.isRegularFile(locationAsPath))
|
if (Files.notExists(locationAsPath) || Files.isRegularFile(locationAsPath))
|
||||||
return System.getProperty("user.home");
|
return System.getProperty("user.home");
|
||||||
|
}
|
||||||
|
catch (Exception ignored){}
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue