1
0
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:
Kris Maglione
2011-01-21 09:10:35 -05:00
parent 70b38cfbcf
commit 6fe80884d8
2 changed files with 4 additions and 2 deletions

View File

@@ -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"]

View File

@@ -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;
}