зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1241061 - [firefox-ui-tests] Only set file permissions during unzip if attributes are available. r=maja_zf DONTBUILD
This commit is contained in:
Родитель
3a32a94793
Коммит
654c768bd1
|
@ -394,6 +394,8 @@ class FirefoxUITests(TestingMixin, VCSToolsScript):
|
|||
# ZipFile doesn't preserve permissions: http://bugs.python.org/issue15795
|
||||
fname = os.path.realpath(os.path.join(parent_dir, entry))
|
||||
mode = bundle.getinfo(entry).external_attr >> 16 & 0x1FF
|
||||
# Only set permissions if attributes are available.
|
||||
if mode:
|
||||
os.chmod(fname, mode)
|
||||
except zipfile.BadZipfile as e:
|
||||
self.log('%s (%s)' % (e.message, zip),
|
||||
|
|
Загрузка…
Ссылка в новой задаче