diff options
| author | HiFiPhile <[email protected]> | 2025-12-29 20:54:04 +0100 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-12-29 20:54:04 +0100 |
| commit | 237e9f21fd2f5211abd3784954b72fa900fff7ea (patch) | |
| tree | 23b297e656ea900d2229e0fd2c720a838a4c5e0a | |
| parent | d27e55a3dae252025fff429a3951e1b198079ad5 (diff) | |
example/mtp: fix root parent id
Signed-off-by: HiFiPhile <[email protected]>
| -rw-r--r-- | examples/device/mtp/src/mtp_fs_example.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/device/mtp/src/mtp_fs_example.c b/examples/device/mtp/src/mtp_fs_example.c index 7fd7db61b..60fc9f79e 100644 --- a/examples/device/mtp/src/mtp_fs_example.c +++ b/examples/device/mtp/src/mtp_fs_example.c @@ -557,7 +557,7 @@ static int32_t fs_send_object_info(tud_mtp_cb_data_t* cb_data) { return MTP_RESP_INVALID_STORAGE_ID; } - if (obj_info->parent_object != 0) { // not root + if (obj_info->parent_object != 0 && obj_info->parent_object != 0xFFFFFFFFu) { // not root fs_file_t* parent = fs_get_file(obj_info->parent_object); if (parent == NULL || 0u == parent->association_type) { return MTP_RESP_INVALID_PARENT_OBJECT; |
