mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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);
|
||||
return NULL;
|
||||
}
|
||||
if (!after_pathsep(retval, retval + fnamelen)) {
|
||||
retval[fnamelen++] = PATHSEP;
|
||||
retval[fnamelen] = NUL;
|
||||
}
|
||||
add_pathsep(retval);
|
||||
fnamelen = strlen(retval);
|
||||
prepend_dot = FALSE; // nothing to prepend a dot to
|
||||
} else {
|
||||
fnamelen = strlen(fname);
|
||||
|
Loading…
Reference in New Issue
Block a user