Skip to content

Commit 1de3c22

Browse files
committed
Fixed two bugs affecting adding and copying nodes with escaped chars (e.g. spaces) in the filepath
1 parent 2504666 commit 1de3c22

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nerdtree_plugin/fs_menu.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function! NERDTreeAddNode()
5757
let newNodeName = input("Add a childnode\n".
5858
\ "==========================================================\n".
5959
\ "Enter the dir/file name to be created. Dirs end with a '/'\n" .
60-
\ "", curDirNode.path.str({'format': 'Glob'}) . g:NERDTreePath.Slash())
60+
\ "", curDirNode.path.str() . g:NERDTreePath.Slash())
6161

6262
if newNodeName ==# ''
6363
call s:echo("Node Creation Aborted.")

plugin/NERD_tree.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ function! s:Path.copy(dest)
20102010

20112011
let dest = s:Path.WinToUnixPath(a:dest)
20122012

2013-
let cmd = g:NERDTreeCopyCmd . " " . self.str() . " " . dest
2013+
let cmd = g:NERDTreeCopyCmd . " " . escape(self.str(), s:escape_chars) . " " . escape(dest, s:escape_chars)
20142014
let success = system(cmd)
20152015
if success != 0
20162016
throw "NERDTree.CopyError: Could not copy ''". self.str() ."'' to: '" . a:dest . "'"

0 commit comments

Comments
 (0)