Bug 1154591 - getCanStageUpdates has incorrect checks for Windows and B2G. r=bbondy, r=spohl

This commit is contained in:
Robert Strong 2015-04-15 08:44:48 -07:00
Родитель 6fc008ccfc
Коммит f3f5c3e99f
1 изменённых файлов: 13 добавлений и 9 удалений

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

@ -608,16 +608,20 @@ function getCanStageUpdates() {
return false;
}
if (AppConstants.platform == "win" && isServiceInstalled() &&
shouldUseService()) {
// No need to perform directory write checks, the maintenance service will
// be able to write to all directories.
LOG("getCanStageUpdates - able to stage updates because we'll use the service");
return true;
}
// For Gonk, the updater will remount the /system partition to move staged
// files into place and it uses the app.update.service.enabled preference for
// this purpose.
if (AppConstants.platform == "win" || AppConstants.platform == "gonk") {
if (getPref("getBoolPref", PREF_APP_UPDATE_SERVICE_ENABLED, false)) {
// No need to perform directory write checks, the maintenance service will
// be able to write to all directories.
LOG("getCanStageUpdates - able to stage updates because we'll use the service");
return true;
}
// files into place.
if (AppConstants.platform == "gonk") {
LOG("getCanStageUpdates - able to stage updates because this is gonk");
return true;
}
if (!hasUpdateMutex()) {