From c19391d5404937873cf2f3ac3d9fb31885234f30 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Wed, 11 Aug 2021 00:08:48 +0200 Subject: [PATCH] AP_Filesystem: correct file open flags for append --- libraries/AP_Filesystem/posix_compat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Filesystem/posix_compat.cpp b/libraries/AP_Filesystem/posix_compat.cpp index d548b6b104..2e80cbb929 100644 --- a/libraries/AP_Filesystem/posix_compat.cpp +++ b/libraries/AP_Filesystem/posix_compat.cpp @@ -71,7 +71,7 @@ static int posix_fopen_modes_to_open(const char *mode) } if (modecmp(mode,"a+") || modecmp(mode, "a+b" ) || modecmp(mode, "ab+" )) { flag = O_RDWR | O_CREAT | O_APPEND; - return -1; + return flag; } return -1; }