skip zoomifying if the image is less recent than the tiles
This commit is contained in:
parent
5b81654afc
commit
0ebc3a3d28
|
@ -35,6 +35,9 @@ module Zoomifier
|
||||||
#filename = File.expand_path(filename)
|
#filename = File.expand_path(filename)
|
||||||
outputdir = File.dirname(filename) + '/' + File.basename(filename, '.*')
|
outputdir = File.dirname(filename) + '/' + File.basename(filename, '.*')
|
||||||
raise ArgumentError unless filename != outputdir
|
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)
|
FileUtils.rm_rf(outputdir) if File.exists?(outputdir)
|
||||||
Dir.mkdir(outputdir)
|
Dir.mkdir(outputdir)
|
||||||
tmpdir = "#{outputdir}/tmp"
|
tmpdir = "#{outputdir}/tmp"
|
||||||
|
|
Loading…
Reference in New Issue