mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Make sure the path to the bookmarks file exists before writing it.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user