summaryrefslogtreecommitdiff
path: root/examples/device/mtp/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-01-13 20:12:26 +0700
committerGitHub <[email protected]>2026-01-13 20:12:26 +0700
commit72da5f982d63ffae8fe248e45fe3b825ea65d4fc (patch)
tree67a57052b2bd6bd2186be8d845ae142bdc852d3e /examples/device/mtp/src
parenta71cb23647d3eafd3f34b3641fd17ea49b131aec (diff)
parent0d28bdc27f90ab5e77576e5e28f55349b36abd24 (diff)
Merge pull request #3439 from hathach/mtp_zlp
device/mtp: queue ZLP when needed
Diffstat (limited to 'examples/device/mtp/src')
-rw-r--r--examples/device/mtp/src/mtp_fs_example.c2
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;