]> git.proxmox.com Git - pmg-api.git/commitdiff
pmg_restore: make sure restore directory is empty
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 30 Oct 2020 06:25:44 +0000 (07:25 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 30 Oct 2020 06:25:44 +0000 (07:25 +0100)
src/PMG/Backup.pm

index 3745015df17002da9aea6431f06ba03092f89e39..aff8814a52cc1bab01eb4ea840cb79fb40267535 100644 (file)
@@ -254,6 +254,8 @@ sub pmg_restore {
     eval {
 
        if ($untar) {
+           # remove any leftovers
+           rmtree $dirname;
            # create a temporary directory
            mkdir $dirname;