mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-10-06 09:02:52 +08:00
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: