LIBMTP_Create_Folder's documentation says:
@param parent_id id of parent folder to add the new folder to,
* or 0 to put it in the root directory.
However, the MTP spec under section D.2.12 SendObjectInfo says the special value of 0xFFFFFFFF should be used:
If the initiator wishes to place an object in the root of a given storage, it shall indicate the desired storage in the first parameter and include a value of 0xFFFFFFFF in the second parameter.
And there is a similar description under E.2.4 for SendObjectPropList.
As LIBMTP_Create_Folder uses SendObjectInfo or SendObjectPropList, either the documentation should be updated to specify 0xFFFFFFFF intead of 0, or it should check this itself and pass 0xFFFFFFFF instead of 0 in the second parameter. This causes some Android devices not to be able to create folders in the root of a storage as they are looking for the special MTP_PARENT_ROOT value of 0xFFFFFFFF.
Anonymous
Hi,
Thanks for the report! If I got it right, this patch will be enough.
Marcus, what would you say?
Hey, originaly reporter, forgot to login when I filed. Yes that patch looks good to me.
patch is good.
Fixed in git, thanks!