From 4f6fe3389eb97e2939753a4a502eb1664a81b459 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 18 Jan 2022 06:44:49 +1100 Subject: [PATCH] AP_Filesystem: fixed a param ftp bug if param count changes we need to zero the file size --- libraries/AP_Filesystem/AP_Filesystem_Param.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_Filesystem/AP_Filesystem_Param.cpp b/libraries/AP_Filesystem/AP_Filesystem_Param.cpp index 3ab8d687f3..5d3203227c 100644 --- a/libraries/AP_Filesystem/AP_Filesystem_Param.cpp +++ b/libraries/AP_Filesystem/AP_Filesystem_Param.cpp @@ -56,6 +56,7 @@ int AP_Filesystem_Param::open(const char *fname, int flags) r.start = 0; r.count = 0; r.read_size = 0; + r.file_size = 0; r.writebuf = nullptr; if (!read_only) { // setup for upload