]> git.proxmox.com Git - pve-manager.git/commitdiff
Die if dumpdir and storage are both defined
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 30 Jun 2020 08:24:24 +0000 (10:24 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 30 Jun 2020 11:54:16 +0000 (13:54 +0200)
dumpdir will be overwritten if a storage is specified

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/VZDump.pm

index dceeb9ca9707e64c7bdddb4a9f0cc37605016b24..ce8796d9e8a6d7de02efb6ce1731b654c32c573e 100644 (file)
@@ -449,7 +449,9 @@ sub new {
     }
 
     if (defined($opts->{storage}) && $opts->{stdout}) {
-       die "unable to use option 'storage' with option 'stdout'\n";
+       die "cannot use options 'storage' and 'stdout' at the same time\n";
+    } elsif (defined($opts->{storage}) && defined($opts->{dumpdir})) {
+       die "cannot use options 'storage' and 'dumpdir' at the same time\n";
     }
 
     if (!$opts->{dumpdir} && !$opts->{storage}) {