Skip to content

Commit

Permalink
Fix addon issues when moving the profile directory patch from Tor Bro…
Browse files Browse the repository at this point in the history
…wser
  • Loading branch information
K4sum1 committed Sep 16, 2024
1 parent 04b2122 commit 54897dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ class XPIState {

// Builds prior to be 1512436 did not include the rootURI property.
// If we're updating from such a build, add that property now.
if (!("rootURI" in this) && this.file) {
if (this.file) {
this.rootURI = getURIForResourceInFile(this.file, "").spec;
}

Expand All @@ -481,7 +481,10 @@ class XPIState {
saved.currentModifiedTime != this.lastModifiedTime
) {
this.lastModifiedTime = saved.currentModifiedTime;
} else if (saved.currentModifiedTime === null) {
} else if (
saved.currentModifiedTime === null &&
(!this.file || !this.file.exists())
) {
this.missing = true;
}
}
Expand Down Expand Up @@ -1452,6 +1455,7 @@ var XPIStates = {

if (shouldRestoreLocationData && oldState[loc.name]) {
loc.restore(oldState[loc.name]);
changed = changed || loc.path != oldState[loc.name].path;
}
changed = changed || loc.changed;

Expand Down

0 comments on commit 54897dc

Please sign in to comment.