Skip to content

Commit

Permalink
fix windows path.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed Jul 26, 2012
1 parent e8fdb50 commit 6ddf2e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions autoload/vcs.vim
Expand Up @@ -4,7 +4,7 @@ set cpo&vim
let s:detect_cache = {}

function! vcs#detect(args)
let target = vcs#target(a:args)
let target = vcs#escape(vcs#target(a:args))

if exists('s:detect_cache[target]')
return s:detect_cache[target]
Expand Down Expand Up @@ -50,7 +50,7 @@ function! vcs#target(args)
endif
let target = type(args) == type([]) ? args[0] : args
let target = fnamemodify(target, ':p')
return vcs#escape(target)
return target
endfunction

function! vcs#escape(files)
Expand Down
2 changes: 1 addition & 1 deletion autoload/vcs/git/root.vim
Expand Up @@ -3,7 +3,7 @@ set cpo&vim

function! vcs#git#root#do(args)
let target = vcs#target(a:args)
return fnamemodify(finddir('.git', target . ';'), ':p:h:h')
return fnamemodify(finddir('.git', vcs#escape(target) . ';'), ':p:h:h')
endfunction

let &cpo = s:save_cpo
Expand Down
4 changes: 2 additions & 2 deletions autoload/vcs/svn/root.vim
Expand Up @@ -4,9 +4,9 @@ set cpo&vim
function! vcs#svn#root#do(args)
let target = fnamemodify(vcs#target(a:args), ':p:h')
let prev = ''
while finddir('.svn', target . ';') != ''
while finddir('.svn', vcs#escape(target) . ';') != ''
let prev = target
let target = fnamemodify(target, ':p:h:h')
let target = fnamemodify(vcs#escape(target), ':p:h:h')
endwhile
return prev
endfunction
Expand Down

0 comments on commit 6ddf2e3

Please sign in to comment.