diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 2ef589350..ae41579dc 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2512,15 +2512,12 @@ mch_FullName(fname, buf, len, force) } l = STRLEN(buf); - if (l >= len) - retval = FAIL; + if (l >= len - 1) + retval = FAIL; /* no space for trailing "/" */ #ifndef VMS - else - { - if (l > 0 && buf[l - 1] != '/' && *fname != NUL + else if (l > 0 && buf[l - 1] != '/' && *fname != NUL && STRCMP(fname, ".") != 0) - STRCAT(buf, "/"); - } + STRCAT(buf, "/"); #endif } |