Merge pull request #3665 from cesanta/fatfs

unbreak fatfs
This commit is contained in:
Sergey Lyubka
2026-08-23 12:52:54 +01:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -3122,9 +3122,9 @@ static void *ff_open(const char *path, int flags) {
if (flags & MG_FS_WRITE) {
mode |= FA_WRITE;
if (flags & MG_FS_EXCL) {
mode |= FA_OPEN_ALWAYS | FA_OPEN_APPEND;
} else {
mode |= FA_CREATE_NEW;
} else {
mode |= FA_OPEN_ALWAYS | FA_OPEN_APPEND;
}
}
if ((fp = mg_calloc(1, sizeof(*fp))) != NULL &&
+2 -2
View File
@@ -50,9 +50,9 @@ static void *ff_open(const char *path, int flags) {
if (flags & MG_FS_WRITE) {
mode |= FA_WRITE;
if (flags & MG_FS_EXCL) {
mode |= FA_OPEN_ALWAYS | FA_OPEN_APPEND;
} else {
mode |= FA_CREATE_NEW;
} else {
mode |= FA_OPEN_ALWAYS | FA_OPEN_APPEND;
}
}
if ((fp = mg_calloc(1, sizeof(*fp))) != NULL &&