From 587f560c41e1d7a5ea24694845a9878af87207be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Mon, 3 Feb 2014 17:13:53 +0100 Subject: [PATCH] Use shellescape on file names [fixes #9] --- autoload/latex.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/latex.vim b/autoload/latex.vim index 7d84d58..a48339e 100644 --- a/autoload/latex.vim +++ b/autoload/latex.vim @@ -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 @@ -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