Software Development Kit (SDK) and API Discussions

fpolicy-policy-scope-{create,modify} surprising behaviour when adding shares-to-include.

ADRIAN_PYBUS
2,342 Views

When running


na_elem_t* top_node = na_elem_new("shares-to-include);

na_child_add_string(top_node, "string", "File root");

na_child_add(inElem,top_node);


expecting to get


<shares-to-include>

     <string>File root</string>

</shares-to-include>


but then actually got


<shares-to-include>

   <string>File</string>

   <string>root</string>

</shares-to-include>


The 'documentation' for na_child_add_string seems to indicate that we should only get one item.

By adding double quotes around the share name we get the expected behaviour.

The processing of na_child_add_string for shares-to-include differs from other places, i.e. when setting engine name you can't have double quotes around it.


1 REPLY 1

aashray
2,342 Views

Agreed. I'll look into it. Will request a fix in the documentation if necessary. Thank you for pointing it out.

Public