From 0ebc3a3d28b88150722acb953366fc374453570b Mon Sep 17 00:00:00 2001 From: Donald Ball Date: Mon, 24 Nov 2008 20:37:26 -0600 Subject: [PATCH] skip zoomifying if the image is less recent than the tiles --- lib/zoomifier.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/zoomifier.rb b/lib/zoomifier.rb index b383e8e..7fd84c6 100644 --- a/lib/zoomifier.rb +++ b/lib/zoomifier.rb @@ -35,6 +35,9 @@ module Zoomifier #filename = File.expand_path(filename) outputdir = File.dirname(filename) + '/' + File.basename(filename, '.*') raise ArgumentError unless filename != outputdir + if File.directory?(outputdir) && File.file?(outputdir + '/ImageProperties.xml') && File.mtime(filename) <= File.mtime(outputdir + '/ImageProperties.xml') + return + end FileUtils.rm_rf(outputdir) if File.exists?(outputdir) Dir.mkdir(outputdir) tmpdir = "#{outputdir}/tmp"