8000 Fix file creation on SD and SDFS (#216) · earlephilhower/arduino-pico@35c974d · GitHub
[go: up one dir, main page]

Skip to content

Commit 35c974d

Browse files
Fix file creation on SD and SDFS (#216)
The O_CREAT/etc. flags on the Pico are a full 32-bits in size, but the core was generating a flag for SdFat using an 8-bit type, so all the O_CREAT, O_TRUNC, O_APPEND, etc. flags got cut off. Fix the flag size. Fixes #214
1 parent 2747681 commit 35c974d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/SDFS/src/SDFS.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ class SDFSImpl : public FSImpl
234234
}
235235

236236

237-
static uint8_t _getFlags(OpenMode openMode, AccessMode accessMode) {
238-
uint8_t mode = 0;
237+
static int _getFlags(OpenMode openMode, AccessMode accessMode) {
238+
int mode = 0;
239239
if (openMode & OM_CREATE) {
240240
mode |= O_CREAT;
241241
}

0 commit comments

Comments
 (0)
0