From c2376bd6806b8d90002e46badcdab2584f18d125 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 1 Apr 2020 17:33:52 +0200 Subject: [PATCH] :art: Fix library loadibg (windows) --- src/plug.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plug.c b/src/plug.c index d3a626fd..94311e5a 100644 --- a/src/plug.c +++ b/src/plug.c @@ -105,13 +105,16 @@ ANN static void plug_get_all(struct PlugHandle *h, const m_str name) { globfree(&results); #else WIN32_FIND_DATA filedata; - HANDLE file = FindFirstFileA(name,&filedata); + HANDLE file = FindFirstFile(name, &filedata); if(file == INVALID_HANDLE_VALUE) return; - do plug_get(h, filedata.cFileName); - while(FindNextFile(file,&filedata) == 0); + do { + char c[PATH_MAX]; + strcpy(c, name); + strcpy(c + strlen(name) - 4, filedata.cFileName); + plug_get(h, c); + } while(FindNextFile(file,&filedata)); FindClose(file); -#endif } ANN2(1) static void* pp_ini(const struct Gwion_ *gwion, const Vector v) { -- 2.43.0