From 28082774b64b9d8719dc0ca756ca51322b8c5c4a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 Mar 2020 12:58:41 +1100 Subject: [PATCH] GCS_MAVLink: use new DirHandle for directory listings --- libraries/GCS_MAVLink/GCS_FTP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_FTP.cpp b/libraries/GCS_MAVLink/GCS_FTP.cpp index 2e2f44aa27..9dfb4dc7d1 100644 --- a/libraries/GCS_MAVLink/GCS_FTP.cpp +++ b/libraries/GCS_MAVLink/GCS_FTP.cpp @@ -545,7 +545,7 @@ void GCS_MAVLINK::ftp_list_dir(struct pending_ftp &request, struct pending_ftp & request.data[sizeof(request.data) - 1] = 0; // ensure the path is null terminated // open the dir - DIR *dir = AP::FS().opendir((char *)request.data); + auto *dir = AP::FS().opendir((char *)request.data); if (dir == nullptr) { ftp_error(response, FTP_ERROR::FailErrno); AP::FS().closedir(dir);