mobile-config-autoconfig: fix 2x restart
On first start, only restart Firefox once after the files are installed. [2023-04-18 07:07:05] Running mobile-config-autoconfig.js [2023-04-18 07:07:05] Couldn't get Firefox version (expected on first start): TypeError: Services.appinfo.lastAppVersion is null [2023-04-18 07:07:05] Firefox version: 0 (previous: unknown) [2023-04-18 07:07:05] Creating CSS file from fragments: /home/user/.mozilla/firefox/ah7sid6m.default-release/chrome/userChrome.css … [2023-04-18 07:07:05] Updating previous Firefox version to: 0 [2023-04-18 07:07:05] Triggering Firefox restart [2023-04-18 07:07:05] Done [2023-04-18 07:07:11] Running mobile-config-autoconfig.js [2023-04-18 07:07:11] Firefox version: 102 (previous: 0) [2023-04-18 07:07:11] Reading fragments from file: /etc/mobile-config-firefox/userChrome.files [2023-04-18 07:07:11] Fragment with FF version check included: userChrome/popups.before-ff-108.css [2023-04-18 07:07:11] File is up-to-date: /home/user/.mozilla/firefox/ah7sid6m.default-release/chrome/userChrome.css [2023-04-18 07:07:11] Reading fragments from file: /etc/mobile-config-firefox/userContent.files [2023-04-18 07:07:11] File is up-to-date: /home/user/.mozilla/firefox/ah7sid6m.default-release/chrome/userContent.css [2023-04-18 07:07:11] Updating previous Firefox version to: 102 [2023-04-18 07:07:11] Setting default preferences [2023-04-18 07:07:11] Done
This commit is contained in:
parent
c9a1f7af23
commit
758b9c3a17
1 changed files with 4 additions and 1 deletions
|
@ -250,7 +250,10 @@ function css_files_update() {
|
||||||
var file = css_file_get(name);
|
var file = css_file_get(name);
|
||||||
|
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
if (g_ff_version != ff_previous) {
|
/* During the very first start, ff_previous is first "unknown",
|
||||||
|
* then the files get installed and Firefox gets restarted.
|
||||||
|
* Then ff_previous is 0. Don't restart it again. */
|
||||||
|
if (ff_previous != 0 && g_ff_version != ff_previous) {
|
||||||
log("Removing outdated file: " + file.path + " (Firefox" +
|
log("Removing outdated file: " + file.path + " (Firefox" +
|
||||||
" version changed)");
|
" version changed)");
|
||||||
file.remove(false);
|
file.remove(false);
|
||||||
|
|
Loading…
Reference in a new issue