X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FRotate.pm;h=80c25521600c3c4dead844db64bb248a2ca94ac7;hp=71102eb1336e5c8960e3492d248065f6b4557b41;hb=c274bd4e4b6277cabf74da908d1e356b5e33b36b;hpb=dc3ef05d90b1383b3dcc6b30720b614d1b160d07 diff --git a/perl/Sesse/pr0n/Rotate.pm b/perl/Sesse/pr0n/Rotate.pm index 71102eb..80c2552 100644 --- a/perl/Sesse/pr0n/Rotate.pm +++ b/perl/Sesse/pr0n/Rotate.pm @@ -37,8 +37,8 @@ sub handler { push @to_purge, Sesse::pr0n::Common::get_all_cache_urls($r, $dbh, $id); (my $tmpfname = $fname) =~ s/\.jpg$/-tmp.jpg/; - system("/usr/bin/jpegtran -rotate $rotval -copy all < '$fname' > '$tmpfname' && mv '$tmpfname' '$fname'") == 0 - or error($r, "Rotation of $id [/usr/bin/jpegtran -rotate $rotval -copy all < '$fname' > '$tmpfname' && mv '$tmpfname' '$fname'] failed: $!."); + system("/usr/bin/jpegtran -rotate $rotval -copy all < '$fname' > '$tmpfname' && /bin/mv '$tmpfname' '$fname'") == 0 + or error($r, "Rotation of $id [/usr/bin/jpegtran -rotate $rotval -copy all < '$fname' > '$tmpfname' && /bin/mv '$tmpfname' '$fname'] failed: $!."); $r->print("

Rotated image ID `$id' by $rotval degrees.

\n"); if ($rotval == 90 || $rotval == 270) {