[Pkg-mozext-commits] [itsalltext] 389/459: Fixes opening the editor as a text file.
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit 0dd39bdc61902f0c31360f3055c7a0a954809afa
Author: Christian Höltje <docwhat at gerf.org>
Date: Thu Sep 8 17:26:48 2011 -0400
Fixes opening the editor as a text file.
This fixes the problem where the editor was opening the editor itself and
the textfile both as arguments.
Fixes issue #10
---
src/chrome/content/cacheobj.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/chrome/content/cacheobj.js b/src/chrome/content/cacheobj.js
index 62af239..6ba182d 100644
--- a/src/chrome/content/cacheobj.js
+++ b/src/chrome/content/cacheobj.js
@@ -378,15 +378,13 @@ CacheObj.prototype.edit = function (extension, clobber) {
// OS-X .app bundles should be run with open.
args = ['-a', program.path, filename];
program = itsalltext.factoryFile('/usr/bin/open');
- command = ['/usr/bin/open', '-a', program.path, filename];
} else {
/* Mac check because of
* https://bugzilla.mozilla.org/show_bug.cgi?id=322865 */
if (!(itsalltext.isDarwin() || program.isExecutable())) {
throw {name: "NS_ERROR_FILE_ACCESS_DENIED"};
}
- args = [program.path, filename];
- command = [program.path, filename];
+ args = [filename];
}
// Create an observer.
@@ -398,7 +396,7 @@ CacheObj.prototype.edit = function (extension, clobber) {
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
prompts.alert(null, "Editor exited with status of " + subject.exitValue,
- "I ran this command: " + (command.join(' ')) + "\n\n...and it exited with a status of " + subject.exitValue + ".");
+ "I ran this command: " + program + " " (args.join(' ')) + "\n\n...and it exited with a status of " + subject.exitValue + ".");
}
itsalltext.debug("Process exited successfully: ", subject, data);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list