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

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon May 15 09:31:07 CEST 2017


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>';
-- 
2.1.4





More information about the pve-devel mailing list