From aee712c585fa612fccadcead230ec8923f5b29e3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 16 May 2016 12:51:17 +0100 Subject: [PATCH] [Fix] Fix loading of file maps --- src/libutil/map.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libutil/map.c b/src/libutil/map.c index f99c35784f..77c806b196 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -1062,6 +1062,7 @@ rspamd_map_parse_backend (struct rspamd_config *cfg, const gchar *map_line) /* Now check for each proto separately */ if (bk->protocol == MAP_PROTO_FILE) { fdata = g_slice_alloc0 (sizeof (struct file_map_data)); + fdata->st.st_mtime = -1; if (access (bk->uri, R_OK) == -1) { if (errno != ENOENT) { @@ -1072,11 +1073,6 @@ rspamd_map_parse_backend (struct rspamd_config *cfg, const gchar *map_line) msg_info_config ( "map '%s' is not found, but it can be loaded automatically later", bk->uri); - /* We still can add this file */ - fdata->st.st_mtime = -1; - } - else { - stat (bk->uri, &fdata->st); } fdata->filename = g_strdup (bk->uri); -- 2.47.3