summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs/msdos_misc.c
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:02:42 +0100
commit004a63efef768583d872f3d5d45d008c7b597dc6 (patch)
tree23c24160ee65e87aa1e66b7b62ef99afe15ba637 /cpukit/libfs/src/dosfs/msdos_misc.c
parentposix: Fix aio_cancel() (diff)
downloadrtems-004a63efef768583d872f3d5d45d008c7b597dc6.tar.bz2
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.
Diffstat (limited to '')
-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 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,