checking for nil filename
This commit is contained in:
parent
88e48eee76
commit
29304a933b
@ -31,7 +31,7 @@ module Zoomifier
|
|||||||
# zoomified into a directory named 5. If there is already a directory with
|
# zoomified into a directory named 5. If there is already a directory with
|
||||||
# this name, it will be destroyed without mercy.
|
# this name, it will be destroyed without mercy.
|
||||||
def self.zoomify(filename)
|
def self.zoomify(filename)
|
||||||
raise ArgumentError unless File.exists?(filename) && File.file?(filename)
|
raise ArgumentError unless filename && File.file?(filename)
|
||||||
#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
|
||||||
|
Loading…
Reference in New Issue
Block a user