don't cleanup files that actually are albums thumbnails
authorgc <gc>
Sun, 3 Jul 2005 16:10:58 +0000 (16:10 +0000)
committergc <gc>
Sun, 3 Jul 2005 16:10:58 +0000 (16:10 +0000)
bin/booh-backend

index 94e7b446530441ba1278fe956e1297c19dcd021e..0cd2f97ee25043330d84d46ff696e49d0baf07f2 100755 (executable)
@@ -674,7 +674,7 @@ def walk_source_dir
                      concat(thumbnail_images.collect { |e| e[1] }.flatten).
                      concat(thumbnail_videos.collect { |e| e[1] }.flatten).
                      concat(videos)
-            to_del = Dir.entries(dest_dir).find_all { |e| !File.directory?("#{dest_dir}/#{e}") && !all_elements.include?(e) } - themestuff
+            to_del = Dir.entries(dest_dir).find_all { |e| !File.directory?("#{dest_dir}/#{e}") && !all_elements.include?(e) && e !~ /^thumbnails-\w+\.jpg/ } - themestuff
             system("rm -f " + to_del.collect { |e| "#{dest_dir}/#{e}" }.join(' '))
 
             #- copy any resource file that goes with the theme (css, images..)