summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-11-27 17:08:51 -0500
committerGitHub <noreply@github.com>2018-11-27 17:08:51 -0500
commitf6c73b35f9b69ed7490d15be36d9aa36bb9f792f (patch)
tree63d0fbd5961b77eef35f62aa5432facc77d36ca5 /lib
parent913b513929ddfcbeee9ec08cc46f0509fda1610b (diff)
parent28383afa11863f1fe289cc811c8eab403ea79f6f (diff)
Merge pull request #1323 from notro/os_mkdir_a_b
shared-module/os: Fix os.mkdir('a/b')
Diffstat (limited to 'lib')
-rw-r--r--lib/oofatfs/ff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oofatfs/ff.c b/lib/oofatfs/ff.c
index 4e8680545..b0984756b 100644
--- a/lib/oofatfs/ff.c
+++ b/lib/oofatfs/ff.c
@@ -2579,8 +2579,8 @@ FRESULT create_name ( /* FR_OK: successful, FR_INVALID_NAME: could not create
if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) return FR_INVALID_NAME; /* Reject illegal characters for LFN */
lfn[di++] = w; /* Store the Unicode character */
}
- cf = ((w < ' ') || ((w == '/' || w == '\\') && p[si+1] < ' ')) ? NS_LAST : 0; /* Set last segment flag if end of the path */
*path = &p[si]; /* Return pointer to the next segment */
+ cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of the path */
#if _FS_RPATH != 0
if ((di == 1 && lfn[di - 1] == '.') ||
(di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) { /* Is this segment a dot name? */