mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
Fix fopen() in “a” (append) mode
fopen() does not work when file is opened in “a” (append) mode
This commit is contained in:
@@ -152,7 +152,7 @@ static int fat_mode_conv(int m)
|
|||||||
}
|
}
|
||||||
if ((m & O_CREAT) && (m & O_EXCL)) {
|
if ((m & O_CREAT) && (m & O_EXCL)) {
|
||||||
res |= FA_CREATE_NEW;
|
res |= FA_CREATE_NEW;
|
||||||
} else if (m & O_CREAT) {
|
} else if ((m & O_CREAT) && (m & O_TRUNC)) {
|
||||||
res |= FA_CREATE_ALWAYS;
|
res |= FA_CREATE_ALWAYS;
|
||||||
} else if (m & O_APPEND) {
|
} else if (m & O_APPEND) {
|
||||||
res |= FA_OPEN_ALWAYS;
|
res |= FA_OPEN_ALWAYS;
|
||||||
|
Reference in New Issue
Block a user