1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

Volume label does not a directory anymore

This commit is contained in:
AJIOB 2023-07-24 16:26:59 +03:00
parent 64e85ed09a
commit f586c89c31

View file

@ -40,7 +40,8 @@ int32_t libfat_searchdir(struct libfat_filesystem *fs, int32_t dirclust,
for (nent = 0; nent < LIBFAT_SECTOR_SIZE;
nent += sizeof(struct fat_dirent)) {
if (!memcmp(dep->name, name, 11)) {
// Volume label entry must be ignored: it is not a real directory
if ((dep->attribute & 0x08) == 0 && !memcmp(dep->name, name, 11)) {
if (direntry) {
memcpy(direntry->entry, dep, sizeof(*dep));
direntry->sector = s;