зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
39d00c6b1a
Коммит
152a9285ce
|
@ -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");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче