Skip to content

Commit

Permalink
GCS_MAVLink: atomically access directory listing
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Jan 9, 2025
1 parent ac44add commit cf3511d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/GCS_MAVLink/GCS_FTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,9 @@ void GCS_MAVLINK::ftp_list_dir(struct pending_ftp &request, struct pending_ftp &
}

// open the dir
#if AP_FILESYSTEM_LITTLEFS_ENABLED
WITH_SEMAPHORE(AP::FS().get_semaphore((char *)request.data));
#endif
auto *dir = AP::FS().opendir((char *)request.data);
if (dir == nullptr) {
ftp_error(response, FTP_ERROR::FailErrno);
Expand Down

0 comments on commit cf3511d

Please sign in to comment.