diff options
author | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2017-12-06 15:56:50 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-12-07 07:30:16 +0100 |
commit | 2fe368787e1f11e50813b10f4c027bbbb87c9999 (patch) | |
tree | 701973dff53456818041a83bfb8e07c53441f68c /cpukit/libfs/src/dosfs | |
parent | 3f575da2f29de31162cbc454857889bc7e83f587 (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/libfs/src/dosfs')
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_misc.c | 10 |
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, |