bug 826470 - NS_ERROR_FAILURE in nsIProperties.get(), file: resource://gre/modules/Webapps.jsm line: 2290; r=fabrice

--HG--
extra : rebase_source : 51ff08bed65bba70ce092a6c10af526fba2eb96a
This commit is contained in:
Philipp von Weitershausen 2013-01-07 14:30:11 -08:00
Родитель 39d00c6b1a
Коммит 152a9285ce
1 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -2348,18 +2348,17 @@ this.DOMApplicationRegistry = {
#elifdef XP_UNIX
let env = Cc["@mozilla.org/process/environment;1"]
.getService(Ci.nsIEnvironment);
let xdg_data_home_env = env.get("XDG_DATA_HOME");
let xdg_data_home_env;
try {
xdg_data_home_env = env.get("XDG_DATA_HOME");
} catch(ex) {
}
let desktopINI;
if (xdg_data_home_env != "") {
desktopINI = Cc["@mozilla.org/file/local;1"]
.createInstance(Ci.nsIFile);
desktopINI.initWithPath(xdg_data_home_env);
}
else {
desktopINI = Services.dirsvc.get("Home", Ci.nsIFile);
desktopINI.append(".local");
desktopINI.append("share");
if (xdg_data_home_env) {
desktopINI = new FileUtils.File(xdg_data_home_env);
} else {
desktopINI = FileUtils.getFile("Home", [".local", "share"]);
}
desktopINI.append("applications");