[pbs-devel] applied: [pve-devel] [PATCH storage v4 1/3] api: FileRestore: decode and return proper error of file-restore listing

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Nov 15 13:27:47 CET 2022


Am 10/11/2022 um 11:36 schrieb Dominik Csapak:
> since commit
> ba690c40 ("file-restore: remove 'json-error' parameter from list_files")
> 
> in proxmox-backup, the file-restore binary will return the error as json
> when called with '--output-format json' (which we do in PVE::PBSClient)
> 
> here, we assume that 'file-restore' will fail in that case, and we try
> to use the return value as an array ref which fails, and the user never
> sees the real error message.
> 
> To fix that, check the ref type of the return value and act accordingly
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> no changes from v3
> does not depend on rest of series
> fixes error output
> 
>  PVE/API2/Storage/FileRestore.pm | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)
> 
>

applied, thanks!





More information about the pbs-devel mailing list