Unverified Commit c06165c2 authored by Axel H.'s avatar Axel H.
Browse files

fix(ftdetect): escape filenames to avoid failure on special chars (fix #3)

parent 81c0602f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,9 +30,9 @@ function! s:extension(fname)
	" Try to detect the file type without the Jinja extension first. This will
	" fail setting the file type of file extension like 'foo.xxxx.jinja',
	" which is what we want.
	silent execute 'file' fnamemodify(a:fname, ':r')
	silent execute 'file' fnamemodify(fnameescape(a:fname), ':r')
	filetype detect
	silent execute 'file' a:fname
	silent execute 'file' fnameescape(a:fname)
	" Using ':file' has dissociated the buffer from its file, but executing
	" ':edit' fixes this
	noautocmd silent edit