Skip to content

Commit cb66e74

Browse files
committed
Check latest binaries instead of source
- Compare local Tor version with latest stable version of downloadable binaries instead of latest stable version of source.
1 parent 02dd0ac commit cb66e74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/torpanel/Main.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ public static void main(String[] args) {
116116

117117
// Compare latest version with local version
118118
String responseLine;
119-
Pattern pattern = Pattern.compile("^.*<td>\\d+\\.\\d+\\.\\d+\\.\\d+</td>.*$");
119+
Pattern pattern = Pattern.compile("^.*-windows-i686.tar.gz.*$");
120120
while ((responseLine = reader.readLine()) != null) {
121121
Matcher matcher = pattern.matcher(responseLine);
122122
if (matcher.matches()) {
123123
String local = version.replaceAll("\\s.*$", "");
124124
String latest = responseLine
125-
.replaceAll(".*<td>", "")
126-
.replaceAll("</td>.*$", "");
127-
if (!local.equals(latest)) {new popupDialog("Warning", "Your current Tor version is "+local+", but the latest stable version is "+latest+".\n\n"+url.toString(), JOptionPane.WARNING_MESSAGE);}
125+
.replaceAll("^.*r ", "")
126+
.replaceAll("\\)<.*$", "");
127+
if (!local.equals(latest)) {new popupDialog("Warning", "Your current Tor version is "+local+", but binaries are available for the latest stable version of "+latest+".\n\n"+url.toString(), JOptionPane.WARNING_MESSAGE);}
128128
break;
129129
}
130130
}

0 commit comments

Comments
 (0)