handle trailing slashes inside oPath#Rename

previously the RenameCurrent() view function was removing trailing
slashes from the destination path before passing it to oPath, now oPath
handles the slashes
This commit is contained in:
Martin Grenfell 2008-05-10 15:33:11 +12:00
parent f2ce7390b8
commit 8aafa66eac

View File

@ -308,7 +308,8 @@ endfunction
"FUNCTION: oTreeFileNode.Rename {{{3
"Calls the rename method for this nodes path obj
function! s:oTreeFileNode.Rename(newName) dict
call self.path.Rename(a:newName)
let newName = substitute(a:newName, '\(\\\|\/\)$', '', '')
call self.path.Rename(newName)
call self.parent.RemoveChild(self)
let parentPath = self.path.GetPathTrunk()
@ -2843,8 +2844,6 @@ function! s:RenameCurrent()
return
endif
let newNodePath = substitute(newNodePath, '\/$', '', '')
try
let bufnum = bufnr(curNode.path.Str(0))