GCS_MAVLink: use new DirHandle for directory listings
This commit is contained in:
parent
a91c587ef3
commit
28082774b6
@ -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
|
request.data[sizeof(request.data) - 1] = 0; // ensure the path is null terminated
|
||||||
|
|
||||||
// open the dir
|
// open the dir
|
||||||
DIR *dir = AP::FS().opendir((char *)request.data);
|
auto *dir = AP::FS().opendir((char *)request.data);
|
||||||
if (dir == nullptr) {
|
if (dir == nullptr) {
|
||||||
ftp_error(response, FTP_ERROR::FailErrno);
|
ftp_error(response, FTP_ERROR::FailErrno);
|
||||||
AP::FS().closedir(dir);
|
AP::FS().closedir(dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user