mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
moebius#144: Launch command: basilisk "-migration -p" (throws an error)
https://github.com/MoonchildProductions/moebius/pull/144
This commit is contained in:
parent
d3065b6686
commit
3792fb483e
1 changed files with 14 additions and 4 deletions
|
|
@ -63,11 +63,21 @@ XULStore.prototype = {
|
||||||
load: function () {
|
load: function () {
|
||||||
Services.obs.addObserver(this, "profile-before-change", true);
|
Services.obs.addObserver(this, "profile-before-change", true);
|
||||||
|
|
||||||
this._storeFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
|
let profileType = "ProfD";
|
||||||
|
try {
|
||||||
|
this._storeFile = Services.dirsvc.get(profileType, Ci.nsIFile);
|
||||||
|
} catch (ex) {
|
||||||
|
try {
|
||||||
|
profileType = "ProfDS";
|
||||||
|
this._storeFile = Services.dirsvc.get(profileType, Ci.nsIFile);
|
||||||
|
} catch (ex) {
|
||||||
|
throw new Error("Can't find profile directory.");
|
||||||
|
}
|
||||||
|
}
|
||||||
this._storeFile.append(STOREDB_FILENAME);
|
this._storeFile.append(STOREDB_FILENAME);
|
||||||
|
|
||||||
if (!this._storeFile.exists()) {
|
if (!this._storeFile.exists()) {
|
||||||
this.import();
|
this.import(profileType);
|
||||||
} else {
|
} else {
|
||||||
this.readFile();
|
this.readFile();
|
||||||
}
|
}
|
||||||
|
|
@ -90,8 +100,8 @@ XULStore.prototype = {
|
||||||
Services.console.logStringMessage("XULStore: " + message);
|
Services.console.logStringMessage("XULStore: " + message);
|
||||||
},
|
},
|
||||||
|
|
||||||
import: function() {
|
import(profileType) {
|
||||||
let localStoreFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
|
let localStoreFile = Services.dirsvc.get(profileType || "ProfD", Ci.nsIFile);
|
||||||
|
|
||||||
localStoreFile.append("localstore.rdf");
|
localStoreFile.append("localstore.rdf");
|
||||||
if (!localStoreFile.exists()) {
|
if (!localStoreFile.exists()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue