mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor/rename: path_to_absolute()
This commit is contained in:
@@ -2683,7 +2683,7 @@ void buflist_altfpos(win_T *win)
|
||||
}
|
||||
|
||||
/// Check that "ffname" is not the same file as current file.
|
||||
/// Fname must have a full path (expanded by path_get_absolute_path()).
|
||||
/// Fname must have a full path (expanded by path_to_absolute()).
|
||||
///
|
||||
/// @param ffname full path name to check
|
||||
bool otherfile(char_u *ffname)
|
||||
@@ -2693,7 +2693,7 @@ bool otherfile(char_u *ffname)
|
||||
}
|
||||
|
||||
/// Check that "ffname" is not the same file as the file loaded in "buf".
|
||||
/// Fname must have a full path (expanded by path_get_absolute_path()).
|
||||
/// Fname must have a full path (expanded by path_to_absolute()).
|
||||
///
|
||||
/// @param buf buffer to check
|
||||
/// @param ffname full path name to check
|
||||
|
||||
@@ -1699,7 +1699,7 @@ int vim_FullName(const char *fname, char *buf, size_t len, bool force)
|
||||
return OK;
|
||||
}
|
||||
|
||||
int rv = path_get_absolute_path((char_u *)fname, (char_u *)buf, len, force);
|
||||
int rv = path_to_absolute((char_u *)fname, (char_u *)buf, len, force);
|
||||
if (rv == FAIL) {
|
||||
xstrlcpy(buf, fname, len); // something failed; use the filename
|
||||
}
|
||||
@@ -2189,8 +2189,8 @@ int append_path(char *path, const char *to_append, size_t max_len)
|
||||
/// @param force also expand when "fname" is already absolute.
|
||||
///
|
||||
/// @return FAIL for failure, OK for success.
|
||||
static int path_get_absolute_path(const char_u *fname, char_u *buf,
|
||||
size_t len, int force)
|
||||
static int path_to_absolute(const char_u *fname, char_u *buf, size_t len,
|
||||
int force)
|
||||
{
|
||||
char_u *p;
|
||||
*buf = NUL;
|
||||
|
||||
Reference in New Issue
Block a user