>From ee87ab426a454c85f5a10844445be658d1cbb2e9 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Wed, 25 Feb 2009 15:04:30 +0100 Subject: [PATCH] Directories with no dll or exe are not enumerated --- dlls/fusion/tests/asmenum.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/fusion/tests/asmenum.c b/dlls/fusion/tests/asmenum.c index 54c1340..8883d0b 100644 --- a/dlls/fusion/tests/asmenum.c +++ b/dlls/fusion/tests/asmenum.c @@ -240,11 +240,19 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path) if (depth == 0) { - sprintf(parent, "%s, ", ffd.cFileName); + lstrcpyA(parent, ffd.cFileName); } else if (depth == 1) { char culture[MAX_PATH]; + char dll[MAX_PATH], exe[MAX_PATH]; + + /* Directories with no dll or exe will not be enumerated */ + sprintf(dll, "%s\\%s\\%s.dll", path, ffd.cFileName, parent); + sprintf(exe, "%s\\%s\\%s.exe", path, ffd.cFileName, parent); + if (GetFileAttributesA(dll) == INVALID_FILE_ATTRIBUTES && + GetFileAttributesA(exe) == INVALID_FILE_ATTRIBUTES) + continue; ptr = strstr(ffd.cFileName, "_"); *ptr = '\0'; @@ -260,7 +268,7 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path) ptr = strchr(ptr, '_'); ptr++; - sprintf(buf, "Version=%s, Culture=%s, PublicKeyToken=%s", + sprintf(buf, ", Version=%s, Culture=%s, PublicKeyToken=%s", ffd.cFileName, culture, ptr); lstrcpyA(disp, parent); lstrcatA(disp, buf); -- 1.6.0.6