diff --git a/mozilla/browser/components/sessionstore/src/nsSessionStore.js b/mozilla/browser/components/sessionstore/src/nsSessionStore.js index 815b2d985d0..35beb7cdef0 100644 --- a/mozilla/browser/components/sessionstore/src/nsSessionStore.js +++ b/mozilla/browser/components/sessionstore/src/nsSessionStore.js @@ -1672,14 +1672,22 @@ SessionStoreService.prototype = { * delete session datafile and backup */ _clearDisk: function sss_clearDisk() { - try { - this._getSessionFile().remove(false); + var file = this._getSessionFile(); + + if (file.exists()) { + try { + file.remove(false); + } + catch (ex) { dump(ex + '\n'); } // couldn't remove the file - what now? } - catch (ex) { dump(ex); } // couldn't remove the file - what now? + + if (!this._lastSessionCrashed) + return; + try { this._getSessionFile(true).remove(false); } - catch (ex) { dump(ex); } // couldn't remove the file - what now? + catch (ex) { dump(ex + '\n'); } // couldn't remove the file - what now? }, /**