diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index a3e5430ef..d192b6bcf 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2647,7 +2647,15 @@ mch_FullName( { vim_strncpy(buf, fname, p - fname); if (mch_chdir((char *)buf)) - retval = FAIL; + { + // Path does not exist (yet). For a full path fail, + // will use the path as-is. For a relative path use + // the current directory and append the file name. + if (mch_isFullName(fname)) + retval = FAIL; + else + p = NULL; + } else if (*p == '/') fname = p + 1; else |