mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 06:05:01 +02:00
parent
973db46d40
commit
6f47c1badc
@ -262,6 +262,8 @@ void ConfigModuleUtility::CollectPaths(const String& path, std::vector<std::pair
|
|||||||
<< boost::errinfo_api_function("lstat")
|
<< boost::errinfo_api_function("lstat")
|
||||||
<< boost::errinfo_errno(errno)
|
<< boost::errinfo_errno(errno)
|
||||||
<< boost::errinfo_file_name(path));
|
<< boost::errinfo_file_name(path));
|
||||||
|
|
||||||
|
paths.push_back(std::make_pair(path, S_ISDIR(statbuf.st_mode)));
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
struct _stat statbuf;
|
struct _stat statbuf;
|
||||||
int rc = _stat(path.CStr(), &statbuf);
|
int rc = _stat(path.CStr(), &statbuf);
|
||||||
@ -270,9 +272,9 @@ void ConfigModuleUtility::CollectPaths(const String& path, std::vector<std::pair
|
|||||||
<< boost::errinfo_api_function("_stat")
|
<< boost::errinfo_api_function("_stat")
|
||||||
<< boost::errinfo_errno(errno)
|
<< boost::errinfo_errno(errno)
|
||||||
<< boost::errinfo_file_name(path));
|
<< boost::errinfo_file_name(path));
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
paths.push_back(std::make_pair(path, S_ISDIR(statbuf.st_mode)));
|
paths.push_back(std::make_pair(path, ((statbuf.st_mode & S_IFMT) == S_IFDIR)));
|
||||||
|
#endif /* _WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigModuleUtility::ContainsDotDot(const String& path)
|
bool ConfigModuleUtility::ContainsDotDot(const String& path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user