Bug 759390 - Make sure gCanStageUpdates will not fail if the maintenance service pref is set to false; r=rstrong

This commit is contained in:
Ehsan Akhgari 2012-05-30 13:54:10 -04:00
parent 20d2b6d29d
commit ae071a1998

View File

@ -437,7 +437,9 @@ XPCOMUtils.defineLazyGetter(this, "gCanStageUpdates", function aus_gCanStageUpda
// On all platforms except Mac, we need to test the parent directory as well,
// as we need to be able to move files in that directory during the replacing
// step.
updateTestFile = getUpdateFile(['..', FILE_PERMS_TEST]);
updateTestFile = getUpdateDirCreate([]);
updateTestFile = updateTestFile.parent;
updateTestFile.append(FILE_PERMS_TEST);
LOG("gCanStageUpdates - testing write access " + updateTestFile.path);
updateTestFile.createUnique(Ci.nsILocalFile.DIRECTORY_TYPE,
FileUtils.PERMS_DIRECTORY);