From: Jérémie Astor Date: Wed, 1 Apr 2020 15:33:52 +0000 (+0200) Subject: :art: Fix library loadibg (windows) X-Git-Tag: nightly~1726^2~12 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c2376bd6806b8d90002e46badcdab2584f18d125;p=gwion.git :art: Fix library loadibg (windows) --- 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) {