aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/maps
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-08-10 23:44:14 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-08-10 23:44:14 +0100
commit80bc6d9d7588a2ec3d802e7b01a3b2b1d5d5dce9 (patch)
treef5df9695392968a50d89facbea09e094ba067a60 /src/libserver/maps
parent3d6388791666c5f13524cce3f428b875bbdaa345 (diff)
downloadrspamd-80bc6d9d7588a2ec3d802e7b01a3b2b1d5d5dce9.tar.gz
rspamd-80bc6d9d7588a2ec3d802e7b01a3b2b1d5d5dce9.zip
[Minor] Ignore unlink failures when dealing with the caching logic
Issue: #4238
Diffstat (limited to 'src/libserver/maps')
-rw-r--r--src/libserver/maps/map_helpers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libserver/maps/map_helpers.c b/src/libserver/maps/map_helpers.c
index 456af4dc0..6381e6d51 100644
--- a/src/libserver/maps/map_helpers.c
+++ b/src/libserver/maps/map_helpers.c
@@ -1260,6 +1260,7 @@ rspamd_re_map_cache_cleanup_old (struct rspamd_regexp_map_helper *old_re_map)
{
gchar fp[PATH_MAX];
struct rspamd_map *map;
+ gboolean ret = TRUE;
map = old_re_map->map;
@@ -1276,7 +1277,7 @@ rspamd_re_map_cache_cleanup_old (struct rspamd_regexp_map_helper *old_re_map)
if (unlink (fp) == -1) {
msg_warn_map ("cannot unlink stale cache file for %s (%s): %s",
map->name, fp, strerror (errno));
- return FALSE;
+ ret = FALSE;
}
GHashTable *valid_re_hashes;
@@ -1288,7 +1289,7 @@ rspamd_re_map_cache_cleanup_old (struct rspamd_regexp_map_helper *old_re_map)
g_hash_table_remove (valid_re_hashes, fp);
}
- return TRUE;
+ return ret;
}
#endif