# HG changeset patch # User Ian Hickey # Date 1273160895 -3600 # Node ID 77535ef46acd159c16e4c3e1eddb2934e16c5b43 # Parent 4bde1604fc1795fe826574335f34b5e2c3c75594 CA-41107: Fix 'xe vm-export --metadata --multiple' The filename of each separate export needs to be changed to avoid a 'file already exists' type error. Signed-off-by: Ian Hickey Acked-by: Dave Scott diff -r 4bde1604fc17 -r 77535ef46acd ocaml/xapi/cli_operations.ml --- a/ocaml/xapi/cli_operations.ml Thu Apr 29 10:22:35 2010 +0100 +++ b/ocaml/xapi/cli_operations.ml Thu May 06 16:48:15 2010 +0100 @@ -3073,7 +3073,8 @@ finally (fun () -> - download_file ~__context rpc session_id exporttask fd filename + let f = if !num > 1 then filename ^ (string_of_int !num) else filename in + download_file ~__context rpc session_id exporttask fd f (Printf.sprintf "%s?session_id=%s&task_id=%s&ref=%s&preserve_power_state=%b" (if List.mem_assoc "metadata" params