]> git.sesse.net Git - pr0n/commitdiff
Use absolute path for mv.
authorSteinar H. Gunderson <sesse@debian.org>
Fri, 16 Oct 2009 22:35:34 +0000 (00:35 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Fri, 16 Oct 2009 22:35:34 +0000 (00:35 +0200)
perl/Sesse/pr0n/Rotate.pm

index 71102eb1336e5c8960e3492d248065f6b4557b41..80c25521600c3c4dead844db64bb248a2ca94ac7 100644 (file)
@@ -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("    <p>Rotated image ID `$id' by $rotval degrees.</p>\n");
 
                                if ($rotval == 90 || $rotval == 270) {