waldheinz/fat32-lib

Bug in FatDirectoryEntry.parseLfn: Fat can get corrupted

Closed this issue · 1 comments

Fat can get corrupted when you read an existing image and add an new entry to a directory with
a longname that will result in a shortname that is equal to an existing entry. For example if the root directory of an existing image contains a file named bundle.jar (with shortname bundle~1.jar) and you wil add another entry to the root directory say a directory named bundle.jar-embedded. This new entry also gets the shortname bundle~1.jar instead of bundle~2.jar. This happens because usedNames is missing bundle~1.jar as entry.

Thanks again for taking time finding and fixing this issue. Most users of the library use it to "fire and forget" one-time creation of FS images. So adding additional files to an existing FS doesn't get the attention it probably should... Thanks!