Make sure the path to the bookmarks file exists before writing it.
This commit is contained in:
parent
e653a68270
commit
7d9a3f0e8b
@ -343,6 +343,12 @@ function! s:Bookmark.Write()
|
||||
for j in s:Bookmark.InvalidBookmarks()
|
||||
call add(bookmarkStrings, j)
|
||||
endfor
|
||||
|
||||
let path = fnamemodify(g:NERDTreeBookmarksFile, ':h')
|
||||
if !isdirectory(path)
|
||||
call mkdir(path, 'p')
|
||||
endif
|
||||
|
||||
call writefile(bookmarkStrings, g:NERDTreeBookmarksFile)
|
||||
endfunction
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user