diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index c29284019..6cb2ed107 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -48,6 +48,7 @@ # include # include # include +# include #endif /* _WIN32 */ #ifdef _WIN32 @@ -502,6 +503,16 @@ static bool GlobHelper(const String& pathSpec, int type, std::vector& fi } #endif /* _WIN32 */ +#ifndef _WIN32 +static int GlobErrorHandler(const char *epath, int eerrno) +{ + if (eerrno == ENOTDIR) + return 0; + + return eerrno; +} +#endif /* _WIN32 */ + /** * Calls the specified callback for each file matching the path specification. * @@ -556,7 +567,7 @@ bool Utility::Glob(const String& pathSpec, const boost::function