diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-04-06 01:17:54 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-04-06 01:17:54 +1200 |
commit | 82994f97920709c7845fada95e95cd84302e2929 (patch) | |
tree | 25fd7880954c95b26c25c1c8cbd9caa2d4473b44 /vim/autoload | |
parent | Merge branch 'release/v8.15.0' into develop (diff) | |
download | dotfiles-82994f97920709c7845fada95e95cd84302e2929.tar.gz dotfiles-82994f97920709c7845fada95e95cd84302e2929.zip |
Call path create rather than command
Prevents issues with premature expansion of env variables.
Diffstat (limited to 'vim/autoload')
-rw-r--r-- | vim/autoload/path.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/autoload/path.vim b/vim/autoload/path.vim index e230cab2..54aacbc2 100644 --- a/vim/autoload/path.vim +++ b/vim/autoload/path.vim @@ -4,10 +4,10 @@ function! path#Create(name, ...) abort if a:0 > 2 echoerr 'Too many arguments' endif - if isdirectory(a:name) + let name = fnamemodify(a:name, ':p') + if isdirectory(name) return 1 endif - let name = a:name let path = 'p' let prot = a:0 == 1 && a:1 ? 0700 : 0755 return mkdir(name, path, prot) |