Skip to content

Commit

Permalink
Backend: Version to download source checker (hannibal002#2400)
Browse files Browse the repository at this point in the history
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
  • Loading branch information
hannibal002 and hannibal002 authored Aug 24, 2024
1 parent 4b21b3f commit aa48336
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -94,10 +96,11 @@ private static void openMenu(URI host) {
}
));

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,
Expand Down Expand Up @@ -135,7 +138,7 @@ private static URI getDangerousHost() {
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=")) {
Expand Down

0 comments on commit aa48336

Please sign in to comment.