Merge branch 'master' into tbs/crsfv3
This commit is contained in:
commit
fff9fb7279
|
@ -2615,8 +2615,18 @@ static void afatfs_createFileContinue(afatfsFile_t *file)
|
|||
opState->phase = AFATFS_CREATEFILE_PHASE_FAILURE;
|
||||
goto doMore;
|
||||
}
|
||||
} else if (entry->attrib & FAT_FILE_ATTRIBUTE_VOLUME_ID) {
|
||||
break;
|
||||
} else if (strncmp(entry->filename, (char*) opState->filename, FAT_FILENAME_LENGTH) == 0) {
|
||||
// We found a file with this name!
|
||||
// We found a file or directory with this name!
|
||||
|
||||
// Do not open file as dir or dir as file
|
||||
if (((entry->attrib ^ file->attrib) & FAT_FILE_ATTRIBUTE_DIRECTORY) != 0) {
|
||||
afatfs_findLast(&afatfs.currentDirectory);
|
||||
opState->phase = AFATFS_CREATEFILE_PHASE_FAILURE;
|
||||
goto doMore;
|
||||
}
|
||||
|
||||
afatfs_fileLoadDirectoryEntry(file, entry);
|
||||
|
||||
afatfs_findLast(&afatfs.currentDirectory);
|
||||
|
|
Loading…
Reference in New Issue