-clobber with -out option creates unexpected backup files
Advanced PNG optimization program
Status: Beta
Brought to you by:
cosmin
Tested with v0.7.7 (and 0.7.5):
If I use a command similar to below:
optipng -v -clobber -out ~/optimized/test.png test.png
but test.png already exists in the output directly, then a test.png.bak file is created in the output directory even though the -backup or -keep command line option was not specified. Aside from being unexpected, it's also redundant as the original file has not been modified, so no backup is needed!
Expected behaviour:
No backup files created unless -backup option given on command line.
Confirmed as a defect to be fixed in an upcoming version. Thank you for the report.