mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1230564 - stick backup in profile directory instead, r=mconley
This commit is contained in:
parent
080e718bd5
commit
bd2bbe682b
@ -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;
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user