Menu

#1472 LIBMTP_Create_Folder incorrectly passes 0 instead of 0xFFFFFFFF.

1.1.9
closed
None
1
2015-12-23
2015-11-18
Anonymous
No

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.

Discussion

  • Reverend Homer

    Reverend Homer - 2015-11-19
    • status: open --> pending
    • assigned_to: Reverend Homer
     
  • Reverend Homer

    Reverend Homer - 2015-11-19

    Hi,
    Thanks for the report! If I got it right, this patch will be enough.
    Marcus, what would you say?

     
  • Jordan Wisniewski

    Hey, originaly reporter, forgot to login when I filed. Yes that patch looks good to me.

     
  • Marcus Meissner

    Marcus Meissner - 2015-11-21

    patch is good.

     
  • Reverend Homer

    Reverend Homer - 2015-11-22

    Fixed in git, thanks!

     
  • Reverend Homer

    Reverend Homer - 2015-11-22
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB