File: 01_quotation_fix.patch

package info (click to toggle)
cthumb 4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,744 kB
  • sloc: sh: 2,010; makefile: 73
file content (25 lines) | stat: -rw-r--r-- 865 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Michael Banck <mbanck@debian.org>
Subject: Quote filenames when using mogrify

Bug-Debian: http://bugs.debian.org/160647
--- a/cthumb.in
+++ b/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";}
 	}