]> git.proxmox.com Git - pve-zsync.git/commitdiff
followup: pass properties without value
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 7 Mar 2019 08:43:36 +0000 (09:43 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 7 Mar 2019 11:05:03 +0000 (12:05 +0100)
our GetOPts definition of it does not defines a value, so use it as
boolean flag like 'verbose' and either pass ther param or not.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
pve-zsync

index 1d868e13e054d4a0aa21a37757879717ea3905eb..5b1f12c57e6c4f0be6c29d6da85c148295ed4982 100755 (executable)
--- a/pve-zsync
+++ b/pve-zsync
@@ -296,7 +296,7 @@ sub param_to_job {
     $job->{source} = $param->{source};
     $job->{source_user} = $param->{source_user};
     $job->{dest_user} = $param->{dest_user};
-    $job->{properties} = $param->{properties} ? $param->{properties} : 0;
+    $job->{properties} = !!$param->{properties};
 
     return $job;
 }
@@ -442,7 +442,7 @@ sub format_job {
     $text .= " --verbose" if $job->{verbose};
     $text .= " --source-user $job->{source_user}";
     $text .= " --dest-user $job->{dest_user}";
-    $text .= " --properties $job->{properties}" if $job->{properties};
+    $text .= " --properties" if $job->{properties};
     $text .= "\n";
 
     return $text;