patch: quoting $dest in scale_image(), $UseMogrify branch
Michael Banck <[email protected]> Tue, 7 Jan 2003 20:40:33 +0100
| Newsgroups | gmane.comp.web.cthumb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I've just uploaded a new debian version with a patch for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=160647 I've attached the patch. bye, Michael
diff
(text/plain, 761 B)
--- cthumb-4.2.orig/cthumb.in
+++ cthumb-4.2/cthumb.in
@@ -1698,15 +1698,15 @@
print "\tgenerating $dest ... ";
if ($UseMogrify) {
- system "cp $src $dest";
+ system "cp \"$src\" \"$dest\"";
my $cmd = "mogrify -rotate \"$destRotate\" -geometry \"${destWidth}x${destHeight}>\" -quality $quality";
if ($InsertExif){
- my $new_cmd = "jhead -cmd '$cmd &i' $dest";
+ my $new_cmd = "jhead -cmd '$cmd &i' \"$dest\"";
if (system($new_cmd)) { print "cthumb warning: command '$new_cmd' failed: $!\n"; }
else {print "done.\n";}
} else {
- my $new_cmd = "$cmd $dest";
+ my $new_cmd = "$cmd \"$dest\"";
if (system($new_cmd)) { print "cthumb warning: command '$new_cmd' failed: $!\n"; }
else {print "done.\n";}
}