Commit 6ae79cfd authored by rswindell's avatar rswindell
Browse files

Make getdirname() behave more consistently with the function of the

same name in uifc/filepick.c - specifically with regards to paths that
begin with a / (or \ on Windows).
parent ea066f0c
......@@ -117,11 +117,11 @@ char* DLLCALL getdirname(const char* path)
if(*last == '/') {
if(last == path)
return last;
for(last--; last > path; last--) {
if(*last == '/' || *last == '\\')
for(last--; last >= path; last--) {
if(IS_PATH_DELIM(*last))
return last + 1;
}
return last;
return (char*)path;
}
return getfname(path);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment