fix(lua): io.open(filename, “a”) overwriting instead of appending (#5928)

This commit is contained in:
philmoz
2025-02-20 21:32:20 +10:00
committed by GitHub
parent b4bf1eb1ee
commit eea03e52af
+1 -1
View File
@@ -266,7 +266,7 @@ static inline BYTE fatfs_open_mode(const char *mode)
return FA_WRITE | FA_CREATE_ALWAYS;
} else if (mode[0] == 'a') {
/* always open file (create it if necessary) */
return FA_WRITE | FA_OPEN_ALWAYS;
return FA_WRITE | FA_OPEN_APPEND;
} else {
return FA_READ;
}