mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-04 15:35:45 +01:00
Fix generation of temp filenames. Closes issue #285.
This commit is contained in:
@@ -26,11 +26,13 @@ var IO = Module("io", {
|
||||
this._processDir = services.directory.get("CurWorkD", Ci.nsIFile);
|
||||
this._cwd = this._processDir.path;
|
||||
this._oldcwd = null;
|
||||
this.config = config;
|
||||
},
|
||||
|
||||
Local: function (dactyl, modules, window) let ({ Script, io, plugins } = modules) ({
|
||||
|
||||
init: function init() {
|
||||
this.config = modules.config;
|
||||
this._processDir = services.directory.get("CurWorkD", Ci.nsIFile);
|
||||
this._cwd = this._processDir.path;
|
||||
this._oldcwd = null;
|
||||
@@ -285,7 +287,7 @@ var IO = Module("io", {
|
||||
*/
|
||||
createTempFile: function () {
|
||||
let file = services.directory.get("TmpD", Ci.nsIFile);
|
||||
file.append(config.tempFile);
|
||||
file.append(this.config.tempFile);
|
||||
file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, octal(600));
|
||||
|
||||
Cc["@mozilla.org/uriloader/external-helper-app-service;1"]
|
||||
|
||||
@@ -95,7 +95,7 @@ var Config = Module("config", ConfigBase, {
|
||||
},
|
||||
|
||||
get tempFile() {
|
||||
let prefix = this.name.toLowerCase();
|
||||
let prefix = this.name;
|
||||
try {
|
||||
prefix += "-" + window.content.document.location.hostname;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user