aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-08-24 15:02:10 +0200
committerGitHub <noreply@github.com>2024-08-24 15:02:10 +0200
commitaa48336b2f4fa8c5bdc1fbabd6e144c475013198 (patch)
treeb8427810a0493c07648a84ce14abaad70b752d3c /src/main
parent4b21b3f78f11906c5112ba3bed94aeffa129569a (diff)
downloadskyhanni-aa48336b2f4fa8c5bdc1fbabd6e144c475013198.tar.gz
skyhanni-aa48336b2f4fa8c5bdc1fbabd6e144c475013198.tar.bz2
skyhanni-aa48336b2f4fa8c5bdc1fbabd6e144c475013198.zip
Backend: Version to download source checker (#2400)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java7
1 files changed, 5 insertions, 2 deletions
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=")) {