summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clamsmtpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c
index ab14081..deee41f 100644
--- a/src/clamsmtpd.c
+++ b/src/clamsmtpd.c
@@ -709,7 +709,9 @@ static int virus_action(clctx_t* ctx, const char* virus)
if(g_clstate.quarantine)
{
strlcpy(qfilename, g_clstate.directory, MAXPATHLEN);
- strlcat(qfilename, "/virus.", MAXPATHLEN);
+ if (qfilename[strlen(qfilename) - 1] != '/')
+ strlcat(qfilename, "/", MAXPATHLEN);
+ strlcat(qfilename, "virus.", MAXPATHLEN);
/* Points to null terminator */
t = qfilename + strlen(qfilename);