[tbb-commits] [tor-browser/tor-browser-78.8.0esr-10.0-1] Bug 27604: Fix addon issues when moving TB directory

sysrqb at torproject.org sysrqb at torproject.org
Wed Feb 17 04:04:53 UTC 2021


commit 7a19e04fa5aae5cc90a7bcd2dacd7f0afd22da5f
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 bf31932b59f1..5e467fb4f14c 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -485,7 +485,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;
     }
 
@@ -498,7 +498,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;
     }
   }
@@ -1439,6 +1442,7 @@ var XPIStates = {
 
       if (oldState[loc.name]) {
         loc.restore(oldState[loc.name]);
+        changed = changed || loc.path != oldState[loc.name].path;
       }
       changed = changed || loc.changed;
 





More information about the tbb-commits mailing list