[pve-devel] [PATCH v3 manager 08/13] Die if dumpdir and storage are both defined

Fabian Ebner f.ebner at proxmox.com
Tue Jun 30 10:24:24 CEST 2020


dumpdir will be overwritten if a storage is specified

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/VZDump.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index dceeb9ca..ce8796d9 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -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}) {
-- 
2.20.1





More information about the pve-devel mailing list