Bug 998243 - Get correct path of packaged app when local installation is skipped. r=marco

This commit is contained in:
Shian-Yow Wu 2014-06-26 11:17:25 +08:00
parent 3357c9afe3
commit 0ca38c19f7

View File

@ -215,6 +215,16 @@ this.AppsUtils = {
isCoreApp = app.basePath == this.getCoreAppsBasePath();
#endif
debug(app.basePath + " isCoreApp: " + isCoreApp);
// Before bug 910473, this is a temporary workaround to get correct path
// from child process in mochitest.
let prefName = "dom.mozApps.auto_confirm_install";
if (Services.prefs.prefHasUserValue(prefName) &&
Services.prefs.getBoolPref(prefName)) {
return { "path": app.basePath + "/" + app.id,
"isCoreApp": isCoreApp };
}
return { "path": WebappOSUtils.getPackagePath(app),
"isCoreApp": isCoreApp };
},