Bug 836859 - Trying download an update for the maps packaged app fails with INVALID_SIGNATURE r=ferjm

This commit is contained in:
Fabrice Desré 2013-02-01 11:17:32 -08:00
parent 8264110718
commit 79b8a03cc9

View File

@ -273,6 +273,7 @@ this.DOMApplicationRegistry = {
file.copyTo(destDir, aFile);
});
app.installState = "installed";
app.basePath = FileUtils.getDir(DIRECTORY_NAME, ["webapps"], true, true)
.path;
@ -2109,9 +2110,17 @@ this.DOMApplicationRegistry = {
return;
}
// If we get a 4XX or a 5XX http status, bail out like if we had a
// network error.
let responseStatus = requestChannel.responseStatus;
if (responseStatus >= 400 && responseStatus <= 599) {
cleanup("NETWORK_ERROR");
return;
}
self.computeFileHash(zipFile, function onHashComputed(aHash) {
debug("packageHash=" + aHash);
let newPackage = (requestChannel.responseStatus != 304) &&
let newPackage = (responseStatus != 304) &&
(aHash != app.packageHash);
if (!newPackage) {