create the output directory underneath the image

This commit is contained in:
Donald Ball 2008-11-21 00:30:20 -06:00
parent 24baa4a5b5
commit 488d2dda92

View File

@ -33,7 +33,8 @@ module Zoomifier
# this name, it will be destroyed without mercy.
def self.zoomify(filename)
raise ArgumentError unless File.exists?(filename) && File.file?(filename)
outputdir = File.basename(filename, '.*')
#filename = File.expand_path(filename)
outputdir = File.dirname(filename) + '/' + File.basename(filename, '.*')
raise ArgumentError unless filename != outputdir
FileUtils.rm_rf(outputdir) if File.exists?(outputdir)
Dir.mkdir(outputdir)