Bug 1322722: Fix file permissions errors on taskcluster test runs by forcing extracted permissions to not be read only. r=rhelmer

This commit is contained in:
Dave Townsend 2016-12-23 13:04:26 -08:00
Родитель e26ccfecd9
Коммит fba49792c5
2 изменённых файлов: 5 добавлений и 0 удалений

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

@ -874,6 +874,7 @@ var AddonTestUtils = {
for (let part of entry.split("/"))
target.append(part);
zip.extract(entry, target);
target.permissions |= FileUtils.PERMS_FILE;
}
zip.close();

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

@ -352,11 +352,13 @@ function run_test_8() {
zip.open(do_get_addon("test_dictionary"));
dir.append("install.rdf");
zip.extract("install.rdf", dir);
dir.permissions |= FileUtils.PERMS_FILE;
dir = dir.parent;
dir.append("dictionaries");
dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0o755);
dir.append("ab-CD.dic");
zip.extract("dictionaries/ab-CD.dic", dir);
dir.permissions |= FileUtils.PERMS_FILE;
zip.close();
startupManager(false);
@ -485,11 +487,13 @@ function run_test_17() {
zip.open(do_get_addon("test_dictionary"));
dir.append("install.rdf");
zip.extract("install.rdf", dir);
dir.permissions |= FileUtils.PERMS_FILE;
dir = dir.parent;
dir.append("dictionaries");
dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0o755);
dir.append("ab-CD.dic");
zip.extract("dictionaries/ab-CD.dic", dir);
dir.permissions |= FileUtils.PERMS_FILE;
zip.close();
startupManager();