Lymphatus / caesium-clt

Caesium Command Line Tools - Lossy/lossless image compression tool
http://saerasoft.com/caesium
Other
354 stars 34 forks source link

new feature no-clobber and fixed a bug: the original snprintf(x, ., ., x) modifies the string in-place and on my environment the string became blank #31

Closed n-nino closed 6 years ago

Lymphatus commented 6 years ago

I'm gonna look into the bugfix to test it on my environment and provide a feedback.

On the new feature: interesting one. The desktop version of Caesium has a "Don't overwrite if the compressed it's bigger than the original", which is similar to the "no clobber". I was also thinking: shouldn't we approach this feature the other way around? I mean, by default the application may not overwrite files and ask for permission, and I could introduce a "-f, --force" flag to skip the prompt. Additionally, I can add an alternative "overwrite only if smaller" flag, which will quietly overwrite only bigger source files and asks/skips others.

Lymphatus commented 6 years ago

Merged 6af6696 and f62394a for the bugfix. Will think about the no-clobber in the next release. Thanks for your contribution.

ggaarder7 commented 6 years ago

Glad if any help XDXD Great work dude! It simplified our life quite a lot.