From: Vsevolod Stakhov Date: Wed, 10 Aug 2022 22:44:14 +0000 (+0100) Subject: [Minor] Ignore unlink failures when dealing with the caching logic X-Git-Tag: 3.3~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80bc6d9d7588a2ec3d802e7b01a3b2b1d5d5dce9;p=thirdparty%2Frspamd.git [Minor] Ignore unlink failures when dealing with the caching logic Issue: #4238 --- diff --git a/src/libserver/maps/map_helpers.c b/src/libserver/maps/map_helpers.c index 456af4dc03..6381e6d511 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