Closed N-R-K closed 1 year ago
The thumbnail filename logic (which doesn't use scrotHaveFileExtension()
) also suffers from this issue.
Well, it still doesn't quite fix the issue. scrot .dotpic
will treat dotpic
as the extension but prefixing a filename with .
in order to hide them is common in unix-like systems.
So we'll probably want to special case leading .
in the basename as well.
I think this takes care of all the edge cases (excluding the thumbnail logic which hasn't been touched yet).
in a command like
scrot ~/.local/testfile
scrot will incorrectly think thatlocal/testfile
is the file extension and thus will try to use it as the output format.ensure that the extension doesn't contain any slashes to avoid such issues.