mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
fix(mavlink): use >= for depth check to match MAX_DEPTH semantics
This commit is contained in:
parent
8d99569643
commit
55b62e5f2b
@ -527,7 +527,7 @@ void MavlinkLogHandler::delete_all_logs(const char *dir, unsigned depth)
|
||||
// Log structure is log/yyyy-mm-dd/file.ulg (2 levels). Cap recursion to prevent stack overflow.
|
||||
static constexpr unsigned MAX_DEPTH = 3;
|
||||
|
||||
if (depth > MAX_DEPTH) {
|
||||
if (depth >= MAX_DEPTH) {
|
||||
PX4_DEBUG("Max depth reached: %s", dir);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user