From aa48336b2f4fa8c5bdc1fbabd6e144c475013198 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:02:10 +0200 Subject: Backend: Version to download source checker (#2400) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java b/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java index 3f4755be3..5fb46592e 100644 --- a/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java +++ b/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java @@ -1,5 +1,7 @@ package at.hannibal2.skyhanni.tweaker; +import at.hannibal2.skyhanni.SkyHanniMod; + import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -94,10 +96,11 @@ public class DownloadSourceChecker { } )); + String version = SkyHanniMod.Companion.getVersion(); JOptionPane.showOptionDialog( frame, String.format(String.join("\n", SECURITY_POPUP), uriToSimpleString(host)), - "SkyHanni Security Error", + "SkyHanni " + version + " Security Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, null, @@ -135,7 +138,7 @@ public class DownloadSourceChecker { private static URI getHost(File file) throws Exception { final File adsFile = new File(file.getAbsolutePath() + ":Zone.Identifier:$DATA"); String host = null; - try(BufferedReader reader = new BufferedReader(new FileReader(adsFile))) { + try (BufferedReader reader = new BufferedReader(new FileReader(adsFile))) { String line = reader.readLine(); while (line != null) { if (line.startsWith("HostUrl=")) { -- cgit