]> git.proxmox.com Git - pmg-api.git/commitdiff
pmg_backup: cleanup - remove useless mkdir
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 30 Oct 2020 06:20:15 +0000 (07:20 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 30 Oct 2020 06:20:15 +0000 (07:20 +0100)
src/PMG/Backup.pm

index 40c41f34b4be883733e5d0ea7a80731b660df557..c9739f27baf771b5a195119d6daec2730b7b4c99 100644 (file)
@@ -132,6 +132,7 @@ sub dumpstatdb {
     die $err if $err;
 }
 
+# this function assumes that directory $dirname exists and is empty
 sub pmg_backup {
     my ($dirname, $include_statistics) = @_;
 
@@ -146,9 +147,6 @@ sub pmg_backup {
 
     eval {
 
-       # create backup directory
-       mkdir $dirname;
-
        # dump the database first
        my $fh = PMG::AtomicFile->open("$dirname/$dbfn", "w") ||
            die "cant open '$dirname/$dbfn' - $! :ERROR";