[Pkg-mozext-commits] [itsalltext] 54/459: Fixed problem with initWithPath on windows
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:06 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 6a3cf9e14e008fad78cded7e1b9cdf67e59bf4b5
Author: Christian Höltje <docwhat at gerf.org>
Date: Thu Jan 4 08:02:22 2007 -0500
Fixed problem with initWithPath on windows
---
chrome/content/preferences.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js
index e94299b..4b9fea4 100644
--- a/chrome/content/preferences.js
+++ b/chrome/content/preferences.js
@@ -17,9 +17,13 @@ function pref_editor_select() {
var initdir = Components.classes["@mozilla.org/file/local;1"].
createInstance(Components.interfaces.nsILocalFile);
- initdir.initWithPath('/usr/bin');
- if (initdir.exists() && initdir.isDirectory()) {
- fp.displayDirectory = initdir;
+ try {
+ initdir.initWithPath('/usr/bin');
+ if (initdir.exists() && initdir.isDirectory()) {
+ fp.displayDirectory = initdir;
+ }
+ } catch(e) {
+ // Ignore error - /usr/bin only useful for unix boxen.
}
var rv = fp.show();
--
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