fix(mavlink): send tabbed size and mtime for directories in ListDirectoryWithTime (#28628)

The ListDirectoryWithTime (opcode 16) entry format is
<type><name>\t<size>\t<mtime>\0, but PX4 only applied it to files and
sent directories as a bare D<name>. MAVSDK's server already sends
D<name>\t0\t<mtime>, so the two servers disagreed and a client had to
special-case which one it was talking to.

Directories are now stat()ed for their modification time and reported
with size 0, matching MAVSDK. The plain ListDirectory (opcode 3)
response is unchanged: existing clients take everything after the D as
the directory name there.

Assisted-by: Claude:claude-fable-5-1

Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
Julian Oes
2026-09-21 10:04:11 +12:00
committed by GitHub
parent afef6a450f
commit b637daa4cf

Diff Content Not Available