]> granicus.if.org Git - icinga2/commitdiff
Fix glob error handling 5863/head
authorJean Flach <jean-marcel.flach@icinga.com>
Thu, 14 Dec 2017 16:04:35 +0000 (17:04 +0100)
committerJean Flach <jean-marcel.flach@icinga.com>
Thu, 14 Dec 2017 16:04:35 +0000 (17:04 +0100)
fixes #5859

lib/base/utility.cpp

index 24d5b1b9250d45c405a206695dd989f9d66f63c3..c97d3ec07da7def72d88b6a54955a3ed0138c52e 100644 (file)
@@ -553,7 +553,7 @@ bool Utility::Glob(const String& pathSpec, const std::function<void (const Strin
 
        int rc = glob(pathSpec.CStr(), GLOB_NOSORT, GlobErrorHandler, &gr);
 
-       if (rc < 0) {
+       if (rc) {
                if (rc == GLOB_NOMATCH)
                        return false;