mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 03:43:33 +08:00
fix(mavlink): use >= for depth check to match MAX_DEPTH semantics
This commit is contained in:
@@ -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.
|
// Log structure is log/yyyy-mm-dd/file.ulg (2 levels). Cap recursion to prevent stack overflow.
|
||||||
static constexpr unsigned MAX_DEPTH = 3;
|
static constexpr unsigned MAX_DEPTH = 3;
|
||||||
|
|
||||||
if (depth > MAX_DEPTH) {
|
if (depth >= MAX_DEPTH) {
|
||||||
PX4_DEBUG("Max depth reached: %s", dir);
|
PX4_DEBUG("Max depth reached: %s", dir);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user