Skip to content
Snippets Groups Projects
Commit abac966e authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Optimize mkpath()

If the path already exists (is a directory), don't need to check each path
element for existence.

This should help with the speed of saving of large file.ini (Nelgin's) when a
lot of directories have "Check for File Existence" set to "Yes".
parent b4cf201d
Branches
Tags
No related merge requests found
Pipeline #7343 passed
......@@ -1214,6 +1214,9 @@ int mkpath(const char* path)
char dir[MAX_PATH+1];
int result=0;
if(isdir(path))
return 0;
#ifdef _WIN32
if(p[1]==':') /* Skip drive letter, if specified */
p+=2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment