summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Leske <sebastian.leske@sleske.name>2016-10-31 15:06:50 +0100
committerSebastian Leske <sebastian.leske@sleske.name>2016-10-31 15:06:50 +0100
commitc49f2ba04c229428e6815986e6bfbf2fb55bf47d (patch)
tree44f5f5349d707c08a409ae81657b37d781e227a9
parent60bc2797f0bd71d87a4eece306e2368afe2a8866 (diff)
downloadnavit-c49f2ba04c229428e6815986e6bfbf2fb55bf47d.tar.gz
Fix:map_csv:If we cannot open a CSV map file, log error and return failure.
-rw-r--r--navit/map/csv/csv.c4
1 files changed, 3 insertions, 1 deletions
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 <stdio.h>
#include <string.h>
#include <math.h>
+#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#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");