commit 2103377dcd42c4dae18d14c28d72bc6013b01d8c
parent e1e63541d434ef54766f496bb06bee3658086310
Author: Beatriz Rizental <bea@torproject.org>
Date: Tue, 3 Feb 2026 21:21:55 +0000
Bug 2013390: Test file extension before testing zip and tarfiles.r=ahal
The tarfile check specifically has been returning false positives on DMG
files.
Differential Revision: https://phabricator.services.mozilla.com/D281070
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testing/mozbase/mozinstall/mozinstall/mozinstall.py b/testing/mozbase/mozinstall/mozinstall/mozinstall.py
@@ -121,12 +121,12 @@ def install(src, dest):
if src.lower().endswith(".msix"):
# MSIX packages _are_ ZIP files, so we need to look for them first.
install_dir = _install_msix(src)
- elif zipfile.is_zipfile(src) or tarfile.is_tarfile(src):
- install_dir = mozfile.extract(src, dest)[0]
elif src.lower().endswith(".dmg"):
install_dir = _install_dmg(src, dest)
elif src.lower().endswith(".exe"):
install_dir = _install_exe(src, dest)
+ elif zipfile.is_zipfile(src) or tarfile.is_tarfile(src):
+ install_dir = mozfile.extract(src, dest)[0]
else:
raise InvalidSource(f"{src} is not a valid installer file")