Skip to content
Snippets Groups Projects
Commit cd38a883 authored by rswindell's avatar rswindell
Browse files

Improved the loop-logic in mkdirs (same functionality).

parent 6fdf84c7
Branches
No related merge requests found
......@@ -924,15 +924,15 @@ int DLLCALL mkdirs(const char* path)
while(*p) {
SKIP_CHARSET(p,sep);
if(*p==0)
break;
tp=p;
FIND_CHARSET(tp,sep);
if(*p) {
safe_snprintf(dir,sizeof(dir),"%.*s",tp-path, path);
if(!isdir(dir)) {
if((result=MKDIR(dir))!=0)
break;
}
}
p=tp;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment