mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 08:04:14 +02:00
parent
349ef5ac2c
commit
63f83e8bec
@ -25,6 +25,8 @@
|
|||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
static std::string GetIcingaInstallPath(void)
|
static std::string GetIcingaInstallPath(void)
|
||||||
{
|
{
|
||||||
@ -124,8 +126,8 @@ static void MkDirP(const std::string& path)
|
|||||||
pos = path.find_first_of("/\\", pos + 1);
|
pos = path.find_first_of("/\\", pos + 1);
|
||||||
|
|
||||||
std::string spath = path.substr(0, pos + 1);
|
std::string spath = path.substr(0, pos + 1);
|
||||||
struct stat statbuf;
|
struct _stat statbuf;
|
||||||
if (stat(spath.c_str(), &statbuf) < 0 && errno == ENOENT)
|
if (_stat(spath.c_str(), &statbuf) < 0 && errno == ENOENT)
|
||||||
MkDir(path.substr(0, pos));
|
MkDir(path.substr(0, pos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user