From: Steinar H. Gunderson Date: Fri, 16 Oct 2009 22:35:34 +0000 (+0200) Subject: Use absolute path for mv. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=c274bd4e4b6277cabf74da908d1e356b5e33b36b;hp=dc3ef05d90b1383b3dcc6b30720b614d1b160d07 Use absolute path for mv. --- 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) {