parse_map now checks if directory exists.

This commit is contained in:
Glenn Y. Rolland 2012-07-27 11:41:34 +02:00
parent 054f2aa524
commit c576b59d16

View file

@ -35,7 +35,10 @@ module Qasim
#rdebug "Config: #{@config_dir}/config" #rdebug "Config: #{@config_dir}/config"
@maps = [] @maps = []
Find.find( @config_dir, APP_SYSCONFIG_DIR ) do |path| map_dirs = [@config_dir, APP_SYSCONFIG_DIR].select{ |d|
File.exists? d and File.directory? d
}
Find.find( *map_dirs ) do |path|
if File.file? path if File.file? path
if File.basename( path ) =~ /.map$/ if File.basename( path ) =~ /.map$/
begin begin