ninxsoft / mist-cli

A Mac command-line tool that automatically downloads macOS Firmwares / Installers.
MIT License
620 stars 29 forks source link

Request: Do not overwrite existing files unless explicitly allowed. #27

Closed PicoMitchell closed 3 years ago

PicoMitchell commented 3 years ago

Currently, if a duplicate file already exists for a download requested by Mist, the download will start and the duplicate file will be deleted/overwritten when the download is complete.

Since overwriting files without warning is not generally the expected behavior on macOS, I think it would make sense for Mist to check if any duplicate files exist (other than temporary files which should be deleted without warning), and exit with an error before starting a download.

For the user to explicitly allow overwriting existing files, a -f, --force argument could be added which would allow Mist to delete and overwrite any and all necessary files to get the requested job done.

ninxsoft commented 3 years ago

I agree it would improve the experience if users can optionally overwrite generated file(s), with mist defaulting to failing / exiting if an existing file is found and the --force flag is not supplied.