summaryrefslogtreecommitdiff
path: root/cpukit
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2017-11-28 16:42:00 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-05 08:00:34 +0100
commitca835e568327ab634f7512219cb33031c0ad7de1 (patch)
treeacbbe55f3c9228a75368ecf3abb84b04c9810987 /cpukit
parentfd5471b6b7761a03e87a11808b57dd123ae49e31 (diff)
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. Update #3257.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libfs/src/dosfs/msdos_misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index 915b733330..79aaa36520 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,