Skip to content
Snippets Groups Projects
Commit 622a5e79 authored by xo30xoqa's avatar xo30xoqa
Browse files

Fixed bug in preprocessparameters()

parent 0494c347
No related branches found
No related tags found
No related merge requests found
......@@ -97,23 +97,19 @@ function preprocessparameters(settings::Dict{String,Any}, defaultoutdir::String)
end
# check if input data are present in the working directory or the package directory
if !isdir(settings["world.mapdirectory"])
@warn "$(settings["world.mapdirectory"]) not found in current working directory."
if isdir(abspath(pkgdir(@__MODULE__), settings["world.mapdirectory"]))
settings["world.mapdirectory"] = abspath(pkgdir(@__MODULE__), settings["world.mapdirectory"])
@warn "Using package directory to load maps: $(settings["world.mapdirectory"])."
#@debug "Using package directory to load map data: $(settings["world.mapdirectory"])".
@debug "Using package directory to load map data: $(settings["world.mapdirectory"])."
else
@warn "Couldn't find maps at $(settings["world.mapdirectory"])."
#Base.error("Couldn't find map directory $(settings["world.mapdirectory"]).") #FIXME
Base.error("Couldn't find map directory $(settings["world.mapdirectory"]).")
end
end
if !isdir(settings["crop.cropdirectory"])
if isdir(abspath(pkgdir(@__MODULE__), settings["crop.cropdirectory"]))
settings["crop.cropdirectory"] = abspath(pkgdir(@__MODULE__), settings["crop.cropdirectory"])
@debug "Using package directory to load crop data: $(settings["crop.cropdirectory"])".
@debug "Using package directory to load crop data: $(settings["crop.cropdirectory"])."
else
#Base.error("Couldn't find crop directory $(settings["crop.cropdirectory"]).")
@warn "Couldn't find crop directory $(settings["crop.cropdirectory"])."
Base.error("Couldn't find crop directory $(settings["crop.cropdirectory"]).")
end
end
# sanity checks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment