mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +00:00
Add vim_gettempdir(), remove global vim_tempdir
vim_gettempdir() and vim_maketempdir() was extracted from vim_tempname().
This commit is contained in:

committed by
Nicolas Hillegeer

parent
29e0cd1571
commit
8cfa7b3d15
@@ -893,11 +893,11 @@ void ex_diffpatch(exarg_T *eap)
|
||||
|| (os_chdir((char *)dirbuf) != 0)) {
|
||||
dirbuf[0] = NUL;
|
||||
} else {
|
||||
if (vim_tempdir != NULL) {
|
||||
ignored = os_chdir((char *)vim_tempdir);
|
||||
} else {
|
||||
ignored = os_chdir("/tmp");
|
||||
char *tempdir = (char *)vim_gettempdir();
|
||||
if (tempdir == NULL) {
|
||||
tempdir = "/tmp";
|
||||
}
|
||||
os_chdir(tempdir);
|
||||
shorten_fnames(TRUE);
|
||||
}
|
||||
#endif // ifdef UNIX
|
||||
|
Reference in New Issue
Block a user