From: Vsevolod Stakhov Date: Wed, 3 Jan 2018 20:37:03 +0000 (+0000) Subject: [Fix] Map absence is not an error X-Git-Tag: 1.7.0~310 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7dcf4ce8a5cd985117d51429bbc63a3935d37e8;p=thirdparty%2Frspamd.git [Fix] Map absence is not an error --- diff --git a/src/libutil/map.c b/src/libutil/map.c index 6061aa927a..01bafc82c8 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -841,9 +841,17 @@ read_map_file (struct rspamd_map *map, struct file_map_data *data, if (access (data->filename, R_OK) == -1) { /* File does not exist, skipping */ - msg_err_map ("%s: map file is unavailable for reading", - data->filename); - return TRUE; + if (errno != ENOENT) { + msg_err_map ("%s: map file is unavailable for reading: %s", + data->filename, strerror (errno)); + + return FALSE; + } + else { + msg_info_map ("%s: map file is not found", + data->filename); + return TRUE; + } } bytes = rspamd_file_xmap (data->filename, PROT_READ, &len, TRUE);