]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Update win32-glob.c to current upstream version
authorWolfgang Stöggl <c72578@yahoo.de>
Tue, 30 Jul 2019 09:31:33 +0000 (11:31 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Fri, 2 Aug 2019 09:10:07 +0000 (11:10 +0200)
See commit https://sourceforge.net/p/sox/code/ci/5761ed/
for upstream fix.

win32/win32-glob.c

index 74f389d3980cf38ba237ec885a7596b0c0dbf663..58d72231736237d56ac71945a86aaa445441a716 100644 (file)
@@ -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)