Pass given file names to key-handler instead of real paths

Misbehaving command lines in the key-handler that rewrite the given files and
thus replace symbolic links instead of their targets shall call realpath(1).

Fixes issue #205 and reverts commit 92e3b578.
This commit is contained in:
Bert Münnich
2017-01-07 14:44:33 +01:00
parent 1c260e701b
commit 5c607ad495
3 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ readonly TMPFILE="/tmp/sxiv.$$"
rotate() {
degree="$1"
while read file; do
tr '\n' \0' | xargs -0 realpath | sort | uniq | while read file; do
case "$(file -b -i "$file")" in
image/jpeg*) jpegtran -rotate "$degree" -copy all -outfile "$file" "$file" ;;
*) mogrify -rotate "$degree" "$file" ;;