From c49f2ba04c229428e6815986e6bfbf2fb55bf47d Mon Sep 17 00:00:00 2001 From: Sebastian Leske Date: Mon, 31 Oct 2016 15:06:50 +0100 Subject: Fix:map_csv:If we cannot open a CSV map file, log error and return failure. --- navit/map/csv/csv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/navit/map/csv/csv.c b/navit/map/csv/csv.c index ec647a920..2726e8ab9 100644 --- a/navit/map/csv/csv.c +++ b/navit/map/csv/csv.c @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef HAVE_UNISTD_H #include #endif @@ -864,7 +865,8 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list fclose(fp); } else { - dbg(lvl_error,"Error opening csv map file %s, starting with empty map\n", m->filename); + dbg(lvl_error,"Error opening csv map file '%s': %s\n", m->filename, strerror(errno)); + return NULL; } } else { dbg(lvl_debug,"No data attribute, starting with in-memory map\n"); -- cgit v1.2.1