mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
win: detect / and \ as root path separator
This commit is contained in:
@@ -2202,7 +2202,11 @@ static int path_get_absolute_path(const char_u *fname, char_u *buf,
|
|||||||
|
|
||||||
// expand it if forced or not an absolute path
|
// expand it if forced or not an absolute path
|
||||||
if (force || !path_is_absolute_path(fname)) {
|
if (force || !path_is_absolute_path(fname)) {
|
||||||
if ((p = vim_strrchr(fname, PATHSEP)) != NULL) {
|
p = vim_strrchr(fname, "/")
|
||||||
|
#ifdef WIN32
|
||||||
|
if (p == NULL) p = vim_strrchr(fname, "\\")
|
||||||
|
#endif
|
||||||
|
if (p != NULL) {
|
||||||
// relative to root
|
// relative to root
|
||||||
if (p == fname) {
|
if (p == fname) {
|
||||||
// only one path component
|
// only one path component
|
||||||
|
Reference in New Issue
Block a user