From ab4772c9b7c60c410000f959637e871eff510f22 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 2 May 2022 15:15:25 +1000 Subject: [PATCH] GCS_MAVLink: support symlinks as files this allows for use of symlinks with ftp and scripts --- 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 3c3b7506ed..f9098f4fd5 100644 --- a/libraries/GCS_MAVLink/GCS_FTP.cpp +++ b/libraries/GCS_MAVLink/GCS_FTP.cpp @@ -567,7 +567,7 @@ void GCS_MAVLINK::ftp_worker(void) { // calculates how much string length is needed to fit this in a list response int GCS_MAVLINK::gen_dir_entry(char *dest, size_t space, const char *path, const struct dirent * entry) { - const bool is_file = entry->d_type == DT_REG; + const bool is_file = entry->d_type == DT_REG || entry->d_type == DT_LNK; if (space < 3) { return -1;