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:
parent
f2ce7390b8
commit
8aafa66eac
@ -308,7 +308,8 @@ endfunction
|
|||||||
"FUNCTION: oTreeFileNode.Rename {{{3
|
"FUNCTION: oTreeFileNode.Rename {{{3
|
||||||
"Calls the rename method for this nodes path obj
|
"Calls the rename method for this nodes path obj
|
||||||
function! s:oTreeFileNode.Rename(newName) dict
|
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)
|
call self.parent.RemoveChild(self)
|
||||||
|
|
||||||
let parentPath = self.path.GetPathTrunk()
|
let parentPath = self.path.GetPathTrunk()
|
||||||
@ -2843,8 +2844,6 @@ function! s:RenameCurrent()
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let newNodePath = substitute(newNodePath, '\/$', '', '')
|
|
||||||
|
|
||||||
try
|
try
|
||||||
let bufnum = bufnr(curNode.path.Str(0))
|
let bufnum = bufnr(curNode.path.Str(0))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user