Skip to content

Commit

Permalink
Use shellescape on file names [fixes #9]
Browse files Browse the repository at this point in the history
  • Loading branch information
lervag committed Feb 3, 2014
1 parent 407e8d1 commit 587f560
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions autoload/latex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ function! s:init_environment()
let b:latex.id = id
else
let data = {}
let data.tex = main
let data.root = fnamemodify(data.tex, ':h')
let data.base = fnamemodify(data.tex, ':t')
let data.name = fnamemodify(data.tex, ':t:r')
let data.tex = shellescape(main)
let data.root = shellescape(fnamemodify(data.tex, ':h'))
let data.base = shellescape(fnamemodify(data.tex, ':t'))
let data.name = shellescape(fnamemodify(data.tex, ':t:r'))
function data.aux() dict
return s:get_main_ext(self, 'aux')
endfunction
Expand Down Expand Up @@ -282,7 +282,7 @@ function! s:get_main_ext(texdata, ext)
for f in map(candidates,
\ 'a:texdata.root . ''/'' . v:val . ''.'' . a:ext')
if filereadable(f)
return fnamemodify(f, ':p')
return shellescape(fnamemodify(f, ':p'))
endif
endfor

Expand Down

0 comments on commit 587f560

Please sign in to comment.