Skip to content

Commit

Permalink
Don't twice escape the directory
Browse files Browse the repository at this point in the history
Mkdir already is already called with an shellescaped parameter. No need
to quote it a second time for the Rmdir() call on VimExit.

Closes issue #22, reported by Daniel Hahler, thanks!
  • Loading branch information
chrisbra committed Mar 12, 2013
1 parent 50f4001 commit 2ee31c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/SudoEdit.vim
Expand Up @@ -89,14 +89,15 @@ endfu

fu! <sid>Mkdir(dir) "{{{2
" First remove the directory, it might still be there from last call
" parameter 'dir' is already shellescaped()!
call SudoEdit#Rmdir(a:dir)
call system("mkdir ". a:dir)
" Clean up on Exit
if !exists('#SudoEditExit#VimLeave')
augroup SudoEditExit
au!
" Clean up when quitting Vim
exe "au VimLeave * :call SudoEdit#Rmdir('".a:dir. "')"
exe "au VimLeave * :call SudoEdit#Rmdir(".a:dir. ")"
augroup END
endif
endfu
Expand Down

0 comments on commit 2ee31c2

Please sign in to comment.