Without NormalizePath function your code still not working with "a\b\c" directory. As stated in the comments:
#ifdef PLATFORM_WIN32
#define DIR_MIN 3 //!! wrong! what about \a\b\c ?
#endif
This is my intention.
It's not wrong with recursion, if they not too long for the stack overflow . I think it's not a problem (MAX_PATH == 260 in the stdlib.h).
So, you prefer:
dir.GetLength() > DIR_MIN
I use another more adequate method (in my opinion of course):
i>0 && path[i - 1] != ':'
To note:
- DirectoryCreate returns variable about success of directory creation. DirectoryCreateMulti do this also.
- DirectoryCreateMulti doesn't keep all directories for verification of existent directory. They use backward search with ReverseFind function.