Remove file if it already exists before copying
Remove file if it already exists before copying

The shutil.copy command will not overwrite files that are read-only which could (should) be the case when deploying files to a webserver, by removing the file if it already exists it will allow the file to be properly replaced with the subsequent copy command.

This is how Django's collectstatic command works (see: https://github.com/django/django/blob/master/django/contrib/staticfiles/management/commands/collectstatic.py#L306) which it appears this app is roughly modeled after.
minimind/Flask-Collect