Use fnameescape for lcd commands (fixes #70)

This commit is contained in:
Karl Yngve Lervåg 2014-11-23 17:24:58 +01:00
parent 90792d70b1
commit 86c189eb39
2 changed files with 4 additions and 4 deletions

View File

@ -160,7 +160,7 @@ function! s:bibtex_search(regexp) " {{{2
" The bibtex completion seems to require that we are in the project root
let l:save_pwd = getcwd()
execute 'lcd ' . g:latex#data[b:latex.id].root
execute 'lcd ' . fnameescape(g:latex#data[b:latex.id].root)
" Find data from external bib files
let bibfiles = join(s:bibtex_find_bibs(), ',')
@ -211,7 +211,7 @@ function! s:bibtex_search(regexp) " {{{2
endif
" Return to previous working directory
execute 'lcd ' . l:save_pwd
execute 'lcd ' . fnameescape(l:save_pwd)
" Find data from 'thebibliography' environments
let lines = readfile(g:latex#data[b:latex.id].tex)

View File

@ -119,7 +119,7 @@ function! latex#util#execute(exe) " {{{1
" Change directory if wanted
if has_key(a:exe, 'wd')
let pwd = getcwd()
execute 'lcd ' . a:exe.wd
execute 'lcd ' . fnameescape(a:exe.wd)
endif
" Set up command string based on the given system
@ -151,7 +151,7 @@ function! latex#util#execute(exe) " {{{1
" Return to previous working directory
if has_key(a:exe, 'wd')
execute 'lcd ' . pwd
execute 'lcd ' . fnameescape(pwd)
endif
if !has("gui_running")