diff options
-rw-r--r-- | src/libserver/re_cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index f4d2496b1..c89536206 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -1941,9 +1941,9 @@ rspamd_re_cache_compile_timer_cb (EV_P_ ev_timer *w, int revents ) return; } - rspamd_snprintf (path, sizeof (path), "%s%c%s.%P.hs.new", cbdata->cache_dir, + rspamd_snprintf (path, sizeof (path), "%s%c%P-XXXXXXXXXX", cbdata->cache_dir, G_DIR_SEPARATOR, re_class->hash, our_pid); - fd = open (path, O_CREAT|O_TRUNC|O_EXCL|O_WRONLY, 00600); + fd = g_mkstemp_full(path, O_CREAT|O_TRUNC|O_EXCL|O_WRONLY, 00600); if (fd == -1) { err = g_error_new (rspamd_re_cache_quark (), errno, |