]> granicus.if.org Git - icinga2/commitdiff
Fix: MkDirP supports '/' and '\' on Windows
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 7 Mar 2016 08:22:07 +0000 (09:22 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 11 Mar 2016 14:51:08 +0000 (15:51 +0100)
fixes #10231

lib/base/utility.cpp

index c86051bb460f53be5dc36278e5e7563c5677fcea..b139ce7b051622421852033cef2b779da158eab3 100644 (file)
@@ -724,7 +724,7 @@ void Utility::MkDirP(const String& path, int mode)
 #ifndef _WIN32
                pos = path.Find("/", pos + 1);
 #else /*_ WIN32 */
-               pos = path.Find("\\", pos + 1);
+               pos = path.FindFirstOf("/\\", pos + 1);
 #endif /* _WIN32 */
                MkDir(path.SubStr(0, pos), mode);
        }