Mac zip archive bugs
Workarounds to avoid Mac zip archive bugs
Mac zip archive bugs
We have identified two bugs related to the handling of NCBI Datasets data packages by macOS. This page provides information to help macOS users successfully download and use the data obtained from NCBI Datasets while avoiding these bugs.
This page describes two bugs affecting macOS users:
- Mac Safari bug: The NCBI Datasets data package appears to be missing files when Mac Safari is set to automatically extract zip archives after download
- Mac archive utility bug: One or more files included in the NCBI Datasets data package are truncated after using the Mac archive utility to extract a zip archive
Mac Safari bug
When I download using Mac Safari, I only see the README file. Where are the data files?
We have identified a bug affecting Mac Safari users. When downloading data from the NCBI Datasets web interface, you may see only the README file after the download has completed (while other files appear to be missing).
This problem is known to affect various versions of macOS, including Mojave (10.14), Catalina (10.15), and Big Sur (11). By default, Mac Safari will automatically extract zip archives after download. Due to a bug in Apple support of zip archives, the extraction may fail to extract all files, but no error message is shown. The failure is dependent on certain details of the zip format, including large file support, necessary for data delivered by NCBI Datasets.
The original zip archive that was downloaded will be found in the Trash. You can recover the downloaded zip archive by opening the Trash folder, and after recovery, extracting the archive manually.
As a workaround to prevent this issue from recurring, we recommend disabling automatic zip archive extraction in Safari until Apple releases a bug fix.
To disable automatic zip archive extraction, go to Safari Preferences, and under General, uncheck the Open “safe” files after downloading option. Note that in addition to preventing Safari from automatically extracting downloaded zip archives, this will also prevent Safari from automatically opening other files types, such as pictures, movies, audio, PDF, and text files.
Mac archive utility bug
When I download data from NCBI Datasets while using macOS, some of the sequence files are truncated.
We have identified a bug affecting macOS users. Following download and extraction of an NCBI Datasets data package, the resulting sequence files are truncated (missing sequence). This appears to specifically affect large sequence files (> 4 GB uncompressed) when using the built-in mac archive utility. By default, when you double-click a zip archive file in Finder, the zip archive will be extracted using the mac archive utility.
As a workaround to prevent this issue from recurring, avoid using the built-in mac archive utility. Instead, you may use the built-in command-line unzip program that is accessible from Terminal, or alternatively, you may consider using a third-party zip archive extraction tool, such as Keka .
Using the built-in unzip program from the command-line
- Open Terminal from the Applications > Utilities folder or you may search for Terminal on your Mac.
- Navigate to the data package (zip archive) location:
- Use the
cd
command to navigate to the directory containing the downloaded data package. For example:
cd /path/to/your/ncbi_dataset.zip
- Alternatively, you may drag and drop the file from Finder into Terminal and the path will be copied to the Terminal window
- Unzip the file.
- Use the
unzip
command followed by the filename.
For example:
unzip ncbi_dataset.zip
Generated November 25, 2024