mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 03:43:50 -05:00
Like m-c did before, create parent directories if needed on m-m.
This commit is contained in:
@@ -663,6 +663,8 @@ function! s:Path.rename(newPath)
|
||||
throw "NERDTree.InvalidArgumentsError: Invalid newPath for renaming = ". a:newPath
|
||||
endif
|
||||
|
||||
call s:Path.createParentDirectories(a:newPath)
|
||||
|
||||
let success = rename(self.str(), a:newPath)
|
||||
if success != 0
|
||||
throw "NERDTree.PathRenameError: Could not rename: '" . self.str() . "'" . 'to:' . a:newPath
|
||||
|
||||
Reference in New Issue
Block a user