aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-16 12:51:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-16 12:51:17 +0100
commitaee712c585fa612fccadcead230ec8923f5b29e3 (patch)
treea4c348fa7abc3489d0b59e2f35f8ab66a691ce2c /src/libutil
parent3974047b848d93f1a317a389b610fb6e9f98f472 (diff)
downloadrspamd-aee712c585fa612fccadcead230ec8923f5b29e3.tar.gz
rspamd-aee712c585fa612fccadcead230ec8923f5b29e3.zip
[Fix] Fix loading of file maps
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/map.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c
index f99c35784..77c806b19 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);