From 004a63efef768583d872f3d5d45d008c7b597dc6 Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Tue, 28 Nov 2017 16:42:00 +0100 Subject: dosfs: Fix files with same name as volume name. Take care that a file in the root directory with the same name as the volume name can be found. Close #3257. --- cpukit/libfs/src/dosfs/msdos_misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpukit/libfs/src/dosfs/msdos_misc.c') diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c index ae06ad3c56..8953b0b5f4 100644 --- a/cpukit/libfs/src/dosfs/msdos_misc.c +++ b/cpukit/libfs/src/dosfs/msdos_misc.c @@ -1585,7 +1585,8 @@ msdos_find_file_in_directory ( printf ("MSFS:[9.2] checksum, entry_matched:%i, lfn_entry:%i, lfn_checksum:%02x/%02x\n", entry_matched, lfn_entry, lfn_checksum, msdos_lfn_checksum(entry)); #endif - } else { + } else if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_VOLUME_ID) + == 0) { bytes_in_entry = MSDOS_SHORT_NAME_LEN + 1; bytes_in_entry = msdos_short_entry_to_utf8_name ( converter, -- cgit v1.2.3