diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-27 00:02:13 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-27 00:02:13 +0000 |
commit | f193fffd16563cfbe7c02a21e19c8bb11707581d (patch) | |
tree | 4bae3092421aa986103b8000b1012989a9ea49e6 /src/buffer.c | |
parent | 551dbcc9b604c2992f908fb475e797fcc116315b (diff) | |
download | vim-git-f193fffd16563cfbe7c02a21e19c8bb11707581d.tar.gz |
updated for version 7.0f02v7.0f02
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index 7d625f2e5..6a7fa2f54 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2635,8 +2635,11 @@ buf_set_name(fnum, name) { vim_free(buf->b_sfname); vim_free(buf->b_ffname); - buf->b_sfname = vim_strsave(name); - buf->b_ffname = FullName_save(buf->b_sfname, FALSE); + buf->b_ffname = vim_strsave(name); + buf->b_sfname = NULL; + /* Allocate ffname and expand into full path. Also resolves .lnk + * files on Win32. */ + fname_expand(buf, &buf->b_ffname, &buf->b_sfname); buf->b_fname = buf->b_sfname; } } @@ -4187,11 +4190,11 @@ fname_expand(buf, ffname, sfname) #ifdef FEAT_SHORTCUT if (!buf->b_p_bin) { - char_u *rfname = NULL; + char_u *rfname; /* If the file name is a shortcut file, use the file it links to. */ rfname = mch_resolve_shortcut(*ffname); - if (rfname) + if (rfname != NULL) { vim_free(*ffname); *ffname = rfname; |