Francesco149 / sharenix

A ShareX clone for Linux and FreeBSD.
GNU General Public License v3.0
589 stars 35 forks source link

scrot does not overwrite files by default #46

Closed xcymax closed 4 years ago

xcymax commented 4 years ago

The sharenix-section and sharenix-window scripts weren't working for me and after looking into it I found why. They are creating a temp file first and then overwriting. However scrot does not overwrite by default and instead it was writing to a new number appended file.

Fix is simple, add the -o flag:

scrot -o -u $sharenixtmp || exit $?
Francesco149 commented 4 years ago

oh, makes sense, weird that your mktemp would generate 2 files with the same name though