diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-01-21 09:10:35 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-01-21 09:10:35 -0500 |
commit | 6fe80884d8b2e72af54d83a3281f071f87e0133a (patch) | |
tree | 8702f567d9be308c05d5d2a6dd490dbe43bcce33 | |
parent | 70b38cfbcfe6673dbb40cd7ba60e428e6adf79d5 (diff) | |
download | pentadactyl-6fe80884d8b2e72af54d83a3281f071f87e0133a.tar.gz |
Fix generation of temp filenames. Closes issue #285.
-rw-r--r-- | common/modules/io.jsm | 4 | ||||
-rw-r--r-- | pentadactyl/content/config.js | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/common/modules/io.jsm b/common/modules/io.jsm index ea035b80..c807fdf0 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -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"] diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index 19644e51..4df9288c 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -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; } |