mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
path: learn save_absolute_path().
This commit is contained in:
parent
8d6540f876
commit
899878d347
@ -390,6 +390,19 @@ FullName_save (
|
||||
return new_fname;
|
||||
}
|
||||
|
||||
/// Saves the absolute path.
|
||||
/// @param name An absolute or relative path.
|
||||
/// @return The absolute path of `name`.
|
||||
char_u *save_absolute_path(const char_u *name)
|
||||
FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_RET FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
if (!path_is_absolute_path(name)) {
|
||||
return FullName_save((char_u *) name, true);
|
||||
}
|
||||
return vim_strsave((char_u *) name);
|
||||
}
|
||||
|
||||
|
||||
#if !defined(NO_EXPANDPATH) || defined(PROTO)
|
||||
|
||||
#if defined(UNIX) || defined(USE_UNIXFILENAME) || defined(PROTO)
|
||||
|
Loading…
Reference in New Issue
Block a user