From c576b59d1624f943358e9a5eb7d618b54cddb653 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Fri, 27 Jul 2012 11:41:34 +0200 Subject: [PATCH] parse_map now checks if directory exists. --- lib/qasim/config.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/qasim/config.rb b/lib/qasim/config.rb index 4b74ef9..0162c06 100644 --- a/lib/qasim/config.rb +++ b/lib/qasim/config.rb @@ -35,7 +35,10 @@ module Qasim #rdebug "Config: #{@config_dir}/config" @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.basename( path ) =~ /.map$/ begin