mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-02 16:11:41 +01:00
bugfix: fix for fatfs "open("xx",O_CREAT|O_WRONLY,0666)" call failure
fatfs 'open' with only O_CREAT flag fails to creat new file Closes https://github.com/espressif/esp-idf/issues/1817
This commit is contained in:
@@ -264,7 +264,7 @@ static int fat_mode_conv(int m)
|
||||
res |= FA_CREATE_NEW;
|
||||
} else if ((m & O_CREAT) && (m & O_TRUNC)) {
|
||||
res |= FA_CREATE_ALWAYS;
|
||||
} else if (m & O_APPEND) {
|
||||
} else if ((m & O_APPEND) || (m & O_CREAT)) {
|
||||
res |= FA_OPEN_ALWAYS;
|
||||
} else {
|
||||
res |= FA_OPEN_EXISTING;
|
||||
|
||||
Reference in New Issue
Block a user