aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-15 16:29:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-15 16:29:47 +1200
commitea0edaae6a54aca15a8703ef94d79f100ecd5a36 (patch)
treeb4dabfbe88ea4a60636b165a54ca7b291cddb661
parentMerge branch 'hotfix/v1.0.1' (diff)
downloadvim-spellfile-local-ea0edaae6a54aca15a8703ef94d79f100ecd5a36.tar.gz
vim-spellfile-local-ea0edaae6a54aca15a8703ef94d79f100ecd5a36.zip
Expand path before attempting creation
-rw-r--r--autoload/spellfile_local.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/autoload/spellfile_local.vim b/autoload/spellfile_local.vim
index 596d997..1ae937b 100644
--- a/autoload/spellfile_local.vim
+++ b/autoload/spellfile_local.vim
@@ -71,8 +71,9 @@ function! spellfile_local#() abort
" Attempt to create the first directory in the list if it doesn't exist
" already. Just let any error happen and reach the user.
"
- if !isdirectory(dirnames[0])
- call mkdir(dirnames[0], 'p', 0700)
+ let dirname = expand(dirnames[0])
+ if !isdirectory(dirname)
+ call mkdir(dirname, 'p', 0700)
endif
" Now we'll actually combine those two together to make a long list of