From 6fe80884d8b2e72af54d83a3281f071f87e0133a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 21 Jan 2011 09:10:35 -0500 Subject: Fix generation of temp filenames. Closes issue #285. --- common/modules/io.jsm | 4 +++- 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; } -- cgit v1.2.3