Bug 1346171 - Part 1 - Check correct file before attempting do delete it. r?sebastian draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Sun, 12 Mar 2017 11:13:22 +0100
changeset 497197 beb99335b1934e7d7ac34923a8aa01a6f5309cda
parent 497196 32fc2cf80d2c390935e2bf148f071ec860fce738
child 497198 d0c240abe4a26bce5ff8fb1f6f931e941bdf015f
push id48826
push usermozilla@buttercookie.de
push dateSun, 12 Mar 2017 11:39:44 +0000
reviewerssebastian
bugs1346171
milestone55.0a1
Bug 1346171 - Part 1 - Check correct file before attempting do delete it. r?sebastian MozReview-Commit-ID: 29UT51xRoVN
mobile/android/components/SessionStore.js
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -142,18 +142,18 @@ SessionStore.prototype = {
     if (this._loadState > STATE_QUITTING) {
       OS.File.remove(this._sessionFile.path);
       OS.File.remove(this._sessionFileBackup.path);
       OS.File.remove(this._sessionFilePrevious.path);
       OS.File.remove(this._sessionFileTemp.path);
     } else { // We're shutting down and must delete synchronously
       if (this._sessionFile.exists()) { this._sessionFile.remove(false); }
       if (this._sessionFileBackup.exists()) { this._sessionFileBackup.remove(false); }
-      if (this._sessionFileBackup.exists()) { this._sessionFilePrevious.remove(false); }
-      if (this._sessionFileBackup.exists()) { this._sessionFileTemp.remove(false); }
+      if (this._sessionFilePrevious.exists()) { this._sessionFilePrevious.remove(false); }
+      if (this._sessionFileTemp.exists()) { this._sessionFileTemp.remove(false); }
     }
   },
 
   _forgetClosedTabs: function ss_forgetClosedTabs() {
     for (let [ssid, win] of Object.entries(this._windows)) {
       win.closedTabs = [];
     }