Skip to content

Commit 7289995

Browse files
committed
Fix windows catch
1 parent 6410f4d commit 7289995

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
base.archivesName = "PlatformTools"
8-
version = "1.0.0"
8+
version = "1.0.1"
99
group = "org.redlance"
1010

1111
repositories {

src/main/java/org/redlance/platformtools/impl/windows/WindowsFileReferer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.redlance.platformtools.PlatformFileReferer;
44

5+
import java.io.FileNotFoundException;
56
import java.io.FileReader;
67
import java.io.IOException;
78
import java.io.Reader;
@@ -14,6 +15,8 @@ public String getFileReferer(String path) throws IOException {
1415
Properties props = new Properties();
1516
try (Reader reader = new FileReader(path + ":Zone.Identifier", StandardCharsets.UTF_8)) {
1617
props.load(reader);
18+
} catch (FileNotFoundException ex) {
19+
return null;
1720
}
1821

1922
return (String) props.getOrDefault("HostUrl",

0 commit comments

Comments
 (0)