mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
02ed66847c
commit
016f47d6e6
@ -726,7 +726,11 @@ void Utility::MkDirP(const String& path, int mode)
|
|||||||
#else /*_ WIN32 */
|
#else /*_ WIN32 */
|
||||||
pos = path.FindFirstOf("/\\", pos + 1);
|
pos = path.FindFirstOf("/\\", pos + 1);
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
MkDir(path.SubStr(0, pos), mode);
|
|
||||||
|
String spath = path.SubStr(0, pos + 1);
|
||||||
|
struct stat statbuf;
|
||||||
|
if (stat(spath.CStr(), &statbuf) < 0 && errno == ENOENT)
|
||||||
|
MkDir(path.SubStr(0, pos), mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user