mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-13 17:53:31 +02:00
Make info directory before attempting to save files there.
This commit is contained in:
@@ -711,7 +711,10 @@ var Events = Module("events", {
|
|||||||
return Events.kill(event);
|
return Events.kill(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.processor) {
|
if (this.processor)
|
||||||
|
events.dbg("ON KEYPRESS " + key + " processor: " + this.processor,
|
||||||
|
event.originalTarget instanceof Element ? event.originalTarget : String(event.originalTarget));
|
||||||
|
else {
|
||||||
let mode = modes.getStack(0);
|
let mode = modes.getStack(0);
|
||||||
if (event.dactylMode)
|
if (event.dactylMode)
|
||||||
mode = Modes.StackElement(event.dactylMode);
|
mode = Modes.StackElement(event.dactylMode);
|
||||||
|
|||||||
@@ -378,12 +378,12 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
UNPERMS: Class.Memoize(function () iter(this.PERMS).map(Array.reverse).toObject()),
|
UNPERMS: Class.Memoize(function () iter(this.PERMS).map(Array.reverse).toObject()),
|
||||||
|
|
||||||
COMMANDS: {
|
COMMANDS: {
|
||||||
unset: /*L*/"Unset",
|
"unset": /*L*/"Unset",
|
||||||
allow: /*L*/"Allowed",
|
"allow": /*L*/"Allowed",
|
||||||
deny: /*L*/"Denied",
|
"deny": /*L*/"Denied",
|
||||||
session: /*L*/"Allowed for the current session",
|
"session": /*L*/"Allowed for the current session",
|
||||||
list: /*L*/"List all cookies for domain",
|
"list": /*L*/"List all cookies for domain",
|
||||||
clear: /*L*/"Clear all cookies for domain",
|
"clear": /*L*/"Clear all cookies for domain",
|
||||||
"clear-persistent": /*L*/"Clear all persistent cookies for domain",
|
"clear-persistent": /*L*/"Clear all persistent cookies for domain",
|
||||||
"clear-session": /*L*/"Clear all session cookies for domain"
|
"clear-session": /*L*/"Clear all session cookies for domain"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
defineModule("storage", {
|
defineModule("storage", {
|
||||||
exports: ["File", "Storage", "storage"],
|
exports: ["File", "Storage", "storage"],
|
||||||
require: ["services", "util"]
|
require: ["promises", "services", "util"]
|
||||||
});
|
});
|
||||||
|
|
||||||
lazyRequire("config", ["config"]);
|
lazyRequire("config", ["config"]);
|
||||||
@@ -227,16 +227,18 @@ var Storage = Module("Storage", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_saveData: function saveData(obj) {
|
_saveData: promises.task(function saveData(obj) {
|
||||||
if (obj.privateData && storage.privateMode)
|
if (obj.privateData && storage.privateMode)
|
||||||
return;
|
return;
|
||||||
if (obj.store && storage.infoPath) {
|
if (obj.store && storage.infoPath) {
|
||||||
var { path } = storage.infoPath.child(obj.name);
|
var { path } = storage.infoPath.child(obj.name);
|
||||||
return OS.File.writeAtomic(
|
yield OS.File.makeDir(storage.infoPath.path,
|
||||||
|
{ ignoreExisting: true });
|
||||||
|
yield OS.File.writeAtomic(
|
||||||
path, obj.serial,
|
path, obj.serial,
|
||||||
{ tmpPath: path + ".part" });
|
{ tmpPath: path + ".part" });
|
||||||
}
|
}
|
||||||
},
|
}),
|
||||||
|
|
||||||
storeForSession: function storeForSession(key, val) {
|
storeForSession: function storeForSession(key, val) {
|
||||||
if (val)
|
if (val)
|
||||||
|
|||||||
Reference in New Issue
Block a user