aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/autoload/path.vim5
-rw-r--r--vim/vimrc2
2 files changed, 4 insertions, 3 deletions
diff --git a/vim/autoload/path.vim b/vim/autoload/path.vim
index 2506ad53..410cd294 100644
--- a/vim/autoload/path.vim
+++ b/vim/autoload/path.vim
@@ -2,9 +2,10 @@ function! path#Create(name, ...) abort
if a:0 > 2
echoerr 'Too many arguments'
endif
- if isdirectory(a:name)
+ let name = expand(a:name)
+ if isdirectory(name)
return 1
endif
let prot = a:0 >= 1 ? a:1 : 0755
- return mkdir(a:name, 'p', prot)
+ return mkdir(name, 'p', prot)
endfunction
diff --git a/vim/vimrc b/vim/vimrc
index aa08fcfd..ddece845 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -111,7 +111,7 @@ endif
" provide alternative permissions in the second argument.
"
command! -bar -complete=dir -nargs=+ CreatePath
- \ call path#Create(expand(<f-args>))
+ \ call path#Create(<f-args>)
" Now that we have a way to create directories if they don’t already exist,
" let’s apply it for the first time to the user runtime directory. Note that