From 54c398a818500415f1d2229f0d44bd54773c8017 Mon Sep 17 00:00:00 2001 From: nkraetzschmar <9020053+nkraetzschmar@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:10:56 +0100 Subject: [PATCH] fix: don't match volume label when reading FAT32 directories (#270) --- filesystem/fat32/fat32.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/filesystem/fat32/fat32.go b/filesystem/fat32/fat32.go index 5c17bffa..0d73567f 100644 --- a/filesystem/fat32/fat32.go +++ b/filesystem/fat32/fat32.go @@ -990,6 +990,10 @@ func (fs *FileSystem) readDirWithMkdir(p string, doMake bool) (*Directory, []*di // do we have an entry whose name is the same as this name? found := false for _, e := range entries { + // don't match volume label + if e.isVolumeLabel { + continue + } // if the filename does not match, continue // match is determined by any one of: // - long filename == provided name