]> git.proxmox.com Git - pmg-api.git/commitdiff
mailqueue: fixup rmtree/mkpath usage
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 26 Mar 2021 17:43:56 +0000 (18:43 +0100)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 26 Mar 2021 17:43:56 +0000 (18:43 +0100)
the mkpath and rmtree functions [0] seem to interpret their
second and third argument as 'verbose' and 'mode', leading to
wrongly created spooldirs.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/MailQueue.pm

index d27f5b3cb731bb95a480ed3353532f8546dbeddd..2841b076570c25f5cb19707605650a5a7fa3c29b 100644 (file)
@@ -24,20 +24,20 @@ sub create_spooldirs {
     my ($lcid, $cleanup) = @_;
 
     # if requested, remove any stale date
-    rmtree(
+    rmtree([
        "$spooldir/cluster",
        "$spooldir/active",
        "$spooldir/virus",
        "$spooldir/spam",
        "$spooldir/attachment",
-    ) if $cleanup;
+    ]) if $cleanup;
 
-    mkpath(
+    mkpath([
        "$spooldir/active",
        "$spooldir/spam",
        "$spooldir/virus",
        "$spooldir/attachment",
-    );
+    ]);
 
     if ($lcid) {
        mkpath "$spooldir/cluster/$lcid/virus";