aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-08-17 17:56:10 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-08-17 18:29:45 -0400
commitacaf480bdcd5f3e8562fd78cd94850f4eb83ec57 (patch)
treefc9bdb7ababb06f68a7a2a6bda8d489a0271fb20
parent4b0b391f9f4ecac903b490cdb0834a2f4ab0e310 (diff)
downloadrneovim-acaf480bdcd5f3e8562fd78cd94850f4eb83ec57.tar.gz
rneovim-acaf480bdcd5f3e8562fd78cd94850f4eb83ec57.tar.bz2
rneovim-acaf480bdcd5f3e8562fd78cd94850f4eb83ec57.zip
host.vim: s:GetManifestPath(): Create base directory if needed.
If the base directory does not exist, let mkdir(...,'p') create it.
-rw-r--r--runtime/autoload/remote/host.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index 355ff339dc..3c70101966 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -132,13 +132,13 @@ function! s:GetManifestPath() abort
endif
let dest = fnamemodify(expand(dest), ':p')
- if !empty(dest) && isdirectory(dest)
- let dest .= 'nvim/'
+ if !empty(dest) && !filereadable(dest)
+ let dest .= ('/' ==# dest[-1:] ? '' : '/') . 'nvim'
call mkdir(dest, 'p', 700)
let manifest_base = dest
endif
- return manifest_base.'rplugin.vim'
+ return manifest_base.'/rplugin.vim'
endfunction