8000 Merge pull request #1066 from Makdaam/issue1033 · tannewt/circuitpython@433a29b · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 433a29b

Browse files
authored
Merge pull request micropython#1066 from Makdaam/issue1033
Fixin issue1033
2 parents fbe98ff + a99f942 commit 433a29b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/oofatfs/ff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2579,8 +2579,8 @@ FRESULT create_name ( /* FR_OK: successful, FR_INVALID_NAME: could not create
25792579
if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) return FR_INVALID_NAME; /* Reject illegal characters for LFN */
25802580
lfn[di++] = w; /* Store the Unicode character */
25812581
}
2582+
cf = ((w < ' ') || ((w == '/' || w == '\\') && p[si+1] < ' ')) ? NS_LAST : 0; /* Set last segment flag if end of the path */
25822583
*path = &p[si]; /* Return pointer to the next segment */
2583-
cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of the path */
25842584
#if _FS_RPATH != 0
25852585
if ((di == 1 && lfn[di - 1] == '.') ||
25862586
(di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) { /* Is this segment a dot name? */

0 commit comments

Comments
 (0)
0