fix crash on videos on first run
authorgc <gc>
Fri, 17 Aug 2007 18:43:52 +0000 (18:43 +0000)
committergc <gc>
Fri, 17 Aug 2007 18:43:52 +0000 (18:43 +0000)
lib/booh/booh-lib.rb

index 84f7b8e..3bfe17b 100644 (file)
@@ -399,7 +399,9 @@ module Booh
             end
             orig_base = File.basename(dests[0]['filename']) + File.basename(orig)
             orig_image = "#{dest_dir}/#{orig_base}.jpg000000.jpg"
-            File.delete(orig_image)
+            if File.exists?(orig_image)
+                File.delete(orig_image)
+            end
             for dest in dests
                 if ! File.exists?(orig_image)
                     if ! gen_video_thumbnail(orig, dest_dir, orig_base, felem && felem.attributes["#{attributes_prefix}color-swap"], frame_offset)