Commit f8604998 authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 24159: version check does not deal with platform specific checks

For known platforms, append "-Windows", "-Linux", "-MacOS", or "-Android"
to torbrowser.version before checking against the recommended versions
JSON file. This allows for platform differences in the supported version.
parent 411f9537
...@@ -752,12 +752,27 @@ function torbutton_do_async_versioncheck() { ...@@ -752,12 +752,27 @@ function torbutton_do_async_versioncheck() {
try { try {
var version_list = JSON.parse(req.responseText); var version_list = JSON.parse(req.responseText);
var my_version = m_tb_prefs.getCharPref("torbrowser.version"); var my_version = m_tb_prefs.getCharPref("torbrowser.version");
for (var v in version_list) { var platformSuffix;
if (version_list[v] == my_version) { var platform = Services.appinfo.OS;
torbutton_log(3, "Version check passed."); switch (platform) {
m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, false); case "WINNT":
return; platformSuffix = "Windows";
} break;
case "Darwin":
platformSuffix = "MacOS";
break;
case "Linux":
case "Android":
platformSuffix = platform;
break;
}
if (platformSuffix)
my_version += "-" + platformSuffix;
if (version_list.indexOf(my_version) >= 0) {
torbutton_log(3, "Version check passed.");
m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, false);
return;
} }
torbutton_log(5, "Your Tor Browser is out of date."); torbutton_log(5, "Your Tor Browser is out of date.");
m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, true); m_tb_prefs.setBoolPref(k_tb_browser_update_needed_pref, true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment