don't background thumbnail creation when we'll be using "identify" to know the exact...
[booh] / lib / booh / booh-lib.rb
index 6edf2afe541f7875e2a4b16331b1181c8fb004c4..942d5fb0bc7ff08b20594b4ad6060c97e78274ff 100644 (file)
@@ -137,7 +137,7 @@ module Booh
         end
     end
 
-    def gen_thumbnails(orig, xmldir, dests)
+    def gen_thumbnails(orig, xmldir, allow_background, dests)
         if !dests.detect { |dest| !File.exists?(dest['filename']) } 
             return true
         end
@@ -163,7 +163,12 @@ module Booh
             end
             for dest in dests
                 if !File.exists?(dest['filename'])
-                    psys("#{$convert} #{convert_options}-geometry #{dest['size']} '#{orig}' '#{dest['filename']}'")
+                    cmd = "#{$convert} #{convert_options}-geometry #{dest['size']} '#{orig}' '#{dest['filename']}'"
+                    if allow_background
+                        psys(cmd)
+                    else
+                        sys(cmd)
+                    end
                 end
             end
             return true