Bug 1230564 - stick backup in profile directory instead, r=mconley

This commit is contained in:
Gijs Kruitbosch 2015-12-04 16:55:06 +00:00
parent 080e718bd5
commit bd2bbe682b
2 changed files with 4 additions and 4 deletions

View File

@ -131,8 +131,8 @@ this.TabGroupsMigrator = {
},
_createBackup(stateStr) {
let dest = Services.dirsvc.get("Desk", Ci.nsIFile);
dest.append("Firefox-tabgroups-backup.json");
let dest = Services.dirsvc.get("ProfD", Ci.nsIFile);
dest.append("tabgroups-session-backup.json");
let promise = OS.File.writeAtomic(dest.path, stateStr, {encoding: "utf-8"});
AsyncShutdown.webWorkersShutdown.addBlocker("TabGroupsMigrator", promise);
return promise;

View File

@ -174,8 +174,8 @@ add_task(function* removingTabGroupsFromJSONTest() {
add_task(function* backupTest() {
yield TabGroupsMigrator._createBackup(JSON.stringify(TEST_STATES.TWO_GROUPS));
let f = Services.dirsvc.get("Desk", Components.interfaces.nsIFile);
f.append("Firefox-tabgroups-backup.json");
let f = Services.dirsvc.get("ProfD", Components.interfaces.nsIFile);
f.append("tabgroups-session-backup.json");
ok(f.exists(), "Should have created the file");
let txt = (new TextDecoder()).decode(yield OS.File.read(f.path));