[tor-commits] [tor-browser/tor-browser-85.0b1-10.5-1] Bug 27604: Fix addon issues when moving TB directory

gk at torproject.org gk at torproject.org
Tue Jan 12 08:37:43 UTC 2021


commit ea97eed6274af994236021ffc3506ebdf524c5de
Author: Alex Catarineu <acat at torproject.org>
Date:   Wed Oct 30 10:44:48 2019 +0100

    Bug 27604: Fix addon issues when moving TB directory
---
 toolkit/mozapps/extensions/internal/XPIProvider.jsm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index ec4350dcba66..92f91b843958 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -473,7 +473,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;
     }
 
@@ -486,7 +486,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;
     }
   }
@@ -1456,6 +1459,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;
 





More information about the tor-commits mailing list