chiark / gitweb /
basic: pass flags to the fnmatch (#3606)
authorEvgeny Vereshchagin <evvers@ya.ru>
Mon, 27 Jun 2016 12:47:37 +0000 (15:47 +0300)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000 (10:13 +0200)
Fixes:
```
$ systemctl list-unit-files 'hey\*'

0 unit files listed.

$ systemctl list-unit-files | grep hey
hey\x7eho.service                          static
```

src/basic/strv.c

index ba4d697..87b11d0 100644 (file)
@@ -847,7 +847,7 @@ bool strv_fnmatch(char* const* patterns, const char *s, int flags) {
         char* const* p;
 
         STRV_FOREACH(p, patterns)
-                if (fnmatch(*p, s, 0) == 0)
+                if (fnmatch(*p, s, flags) == 0)
                         return true;
 
         return false;