From 2e2b81cdfc694c88a052b13e133172cc8d4e6d19 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 29 Nov 2026 19:49:37 +0100 Subject: vbsf: fix regression where files appear multiple times on dir --- lfn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lfn.h') diff --git a/lfn.h b/lfn.h index ec50e75..0ad3df6 100644 --- a/lfn.h +++ b/lfn.h @@ -269,6 +269,8 @@ static inline char *find_real_name( SHFLROOT root = data->drives[drive].root; uint8_t hash_chars = data->drives[drive].opt.hash_chars; SHFLSTRING *shflstr = &lfndirinfo.dirinfo.name; // reuse the lfndirinfo string buffer + // we can reuse it since we only need shflstr as input to the first call, + // before lfndirinfo is used vboxerr err; dprintf("find_real_name path=%Fs filename=%Fs\n", path, filename); @@ -301,8 +303,6 @@ static inline char *find_real_name( SHFL_LIST_RETURN_ONE, &size, shflstr, &lfndirinfo.dirinfo, &resume, &count); - // shflstr not needed anymore, and besides it is now used as lfndirinfo - shflstr = NULL; // Reset the size of the buffer (see find_next_from_vbox) lfndirinfo.dirinfo.name.u16Size = sizeof(lfndirinfo.buf); -- cgit v1.2.3