Skip to content

Commit 5e5a774

Browse files
committed
Fix #81
1 parent fbd5ec9 commit 5e5a774

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/nsusbloader/FilesHelper.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@
2424

2525
public class FilesHelper {
2626
public static String getRealFolder(String location){
27-
Path locationAsPath = Paths.get(location);
28-
if (Files.notExists(locationAsPath) || Files.isRegularFile(locationAsPath))
29-
return System.getProperty("user.home");
27+
try{
28+
Path locationAsPath = Paths.get(location);
29+
if (Files.notExists(locationAsPath) || Files.isRegularFile(locationAsPath))
30+
return System.getProperty("user.home");
31+
}
32+
catch (Exception ignored){}
3033
return location;
3134
}
3235
}

0 commit comments

Comments
 (0)