mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
os_unix: Use libuv uv_cwd instead of getcwd/getwd.
This commit is contained in:

committed by
Thiago de Arruda

parent
d342257ae4
commit
1e2da25d3d
@@ -1244,24 +1244,6 @@ static char * strerror(int err)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Get name of current directory into buffer 'buf' of length 'len' bytes.
|
||||
* Return OK for success, FAIL for failure.
|
||||
*/
|
||||
int mch_dirname(char_u *buf, int len)
|
||||
{
|
||||
#if defined(USE_GETCWD)
|
||||
if (getcwd((char *)buf, len) == NULL) {
|
||||
STRCPY(buf, strerror(errno));
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
#else
|
||||
return getwd((char *)buf) != NULL ? OK : FAIL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get absolute file name into "buf[len]".
|
||||
*
|
||||
|
Reference in New Issue
Block a user