resurrecting-open-source-projects / scrot

SCReenshOT - command line screen capture utility
Other
495 stars 49 forks source link

print a warning if output file was changed #352

Closed N-R-K closed 1 year ago

N-R-K commented 1 year ago

Fixes: https://github.com/resurrecting-open-source-projects/scrot/issues/350

N-R-K commented 1 year ago

With this patch:

$ touch /tmp/test.png
$ ./scrot /tmp/test.png
scrot: `/tmp/test.png` already exists, attempting `/tmp/test_000.png` instead
$ ./scrot /tmp/test.png --format i_dont_exist
scrot: `/tmp/test.png` already exists, attempting `/tmp/test_001.png` instead
scrot: Saving to file /tmp/test_001.png failed