summaryrefslogtreecommitdiff
path: root/cpukit
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2017-12-06 15:56:50 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-07 07:30:16 +0100
commit2fe368787e1f11e50813b10f4c027bbbb87c9999 (patch)
tree701973dff53456818041a83bfb8e07c53441f68c /cpukit
parent3f575da2f29de31162cbc454857889bc7e83f587 (diff)
dosfs: Allow creating a file with similar name.
If there is already a file with a long file name it isn't possible to create a second file which has a name that ends on the first files name (for example ets.beam and sets.beam). This patch fixes that. Update #3258.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libfs/src/dosfs/msdos_misc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index 79aaa36520..24eb2d11e0 100644
--- a/cpukit/libfs/src/dosfs/msdos_misc.c
+++ b/cpukit/libfs/src/dosfs/msdos_misc.c
@@ -1564,9 +1564,13 @@ msdos_find_file_in_directory (
if (entry_matched)
{
if (lfn_entry ||
- lfn_checksum != msdos_lfn_checksum(entry))
- entry_matched = false;
- else if (name_len_remaining == 0) {
+ name_len_remaining > 0 ||
+ lfn_checksum != msdos_lfn_checksum(entry)) {
+ msdos_prepare_for_next_entry(&lfn_start,
+ &entry_matched,
+ &name_len_remaining,
+ name_len_for_compare);
+ } else if (name_len_remaining == 0) {
filename_matched = true;
rc = msdos_on_entry_found (
fs_info,