mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
Refactor modname() to use add_pathsep
Based on splinterofchaos review
This commit is contained in:
parent
a56b09005a
commit
a2273164b6
@ -4375,10 +4375,8 @@ char *modname(const char *fname, const char *ext, bool prepend_dot)
|
|||||||
xfree(retval);
|
xfree(retval);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!after_pathsep(retval, retval + fnamelen)) {
|
add_pathsep(retval);
|
||||||
retval[fnamelen++] = PATHSEP;
|
fnamelen = strlen(retval);
|
||||||
retval[fnamelen] = NUL;
|
|
||||||
}
|
|
||||||
prepend_dot = FALSE; // nothing to prepend a dot to
|
prepend_dot = FALSE; // nothing to prepend a dot to
|
||||||
} else {
|
} else {
|
||||||
fnamelen = strlen(fname);
|
fnamelen = strlen(fname);
|
||||||
|
Loading…
Reference in New Issue
Block a user