[pve-devel] [PATCH common 1/2] api: fix rendering of filepath/string parameters

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Aug 18 17:17:02 CEST 2017


both patches - the fix and the refactoring - look good to me and are an improvement, IMO.

Reviewed-by: Thomas Lamprecht <t.lamprecht at proxmox.com>

On 05/15/2017 09:31 AM, Fabian Grünbichler wrote:
> 25d9bda94127b1a91181cd80bb9948093dea389b broke this check,
> but it is a better idea to check against the actual type
> rather then the rendered type text anyway.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> Reported in https://forum.proxmox.com/threads/pct-man-page-incorrect.34637/#post-169700
> 
>   src/PVE/RESTHandler.pm | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm
> index 961b253..119e26e 100644
> --- a/src/PVE/RESTHandler.pm
> +++ b/src/PVE/RESTHandler.pm
> @@ -415,7 +415,7 @@ my $get_property_description = sub {
>   	$type = '';
>       }
>   
> -    if ($fileparams && $type eq 'string') {
> +    if ($fileparams && $phash->{type} eq 'string') {
>   	foreach my $elem (@$fileparams) {
>   	    if ($name eq $elem) {
>   		$type = '<filepath>';
> 






More information about the pve-devel mailing list