From: Wolfgang Stöggl Date: Tue, 30 Jul 2019 09:31:33 +0000 (+0200) Subject: Update win32-glob.c to current upstream version X-Git-Tag: v1.8.0~68 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f751cb1e9b1012647d3096070bca655417a6c393;p=thirdparty%2Frrdtool-1.x.git Update win32-glob.c to current upstream version See commit https://sourceforge.net/p/sox/code/ci/5761ed/ for upstream fix. --- diff --git a/win32/win32-glob.c b/win32/win32-glob.c index 74f389d3..58d72231 100644 --- a/win32/win32-glob.c +++ b/win32/win32-glob.c @@ -72,7 +72,7 @@ glob( size_t len; unsigned entries = 0; WIN32_FIND_DATAA finddata; - HANDLE hfindfile = FindFirstFileA(pattern, &finddata); + HANDLE hfindfile; if (!pattern || flags != (flags & GLOB_FLAGS) || unused || !pglob) { @@ -93,6 +93,7 @@ glob( len--; path[len] = 0; + hfindfile = FindFirstFileA(pattern, &finddata); if (hfindfile == INVALID_HANDLE_VALUE) { if (flags & GLOB_NOCHECK)