@@ -43,7 +43,7 @@ let s:save_cpo = &cpo
4343set cpo &vim
4444
4545function ! s: CygwinPath (path )
46- return substitute (system (" cygpath -m " . a: path ), ' \n' , ' ' , ' g' )
46+ return substitute (system (" cygpath -m " . syntastic#util#shescape ( a: path) ), ' \n' , ' ' , ' g' )
4747endfunction
4848
4949if ! exists (" g:syntastic_java_javac_temp_dir" )
@@ -123,8 +123,8 @@ function! s:SplitClasspath(classpath)
123123endfunction
124124
125125function ! s: LoadConfigFile ()
126- if filereadable (g: syntastic_java_javac_config_file )
127- exe ' source ' . g: syntastic_java_javac_config_file
126+ if filereadable (expand ( g: syntastic_java_javac_config_file) )
127+ exe ' source ' . fnameescape ( expand ( g: syntastic_java_javac_config_file))
128128 endif
129129endfunction
130130
@@ -137,9 +137,9 @@ function! s:SaveClasspath()
137137 endfor
138138 " save classpath to config file
139139 if g: syntastic_java_javac_config_file_enabled
140- if filereadable (g: syntastic_java_javac_config_file )
140+ if filereadable (expand ( g: syntastic_java_javac_config_file) )
141141 " load lines from config file
142- let lines = readfile (g: syntastic_java_javac_config_file )
142+ let lines = readfile (expand ( g: syntastic_java_javac_config_file) )
143143 " strip g:syntastic_java_javac_classpath options from config file lines
144144 let i = 0
145145 while i < len (lines )
@@ -155,7 +155,7 @@ function! s:SaveClasspath()
155155 " add new g:syntastic_java_javac_classpath option to config
156156 call add (lines , ' let g:syntastic_java_javac_classpath = "' .path .' "' )
157157 " save config file lines
158- call writefile (lines , g: syntastic_java_javac_config_file )
158+ call writefile (lines , expand ( g: syntastic_java_javac_config_file) )
159159 endif
160160 " set new classpath
161161 let g: syntastic_java_javac_classpath = path
@@ -192,7 +192,7 @@ function! s:SaveConfig()
192192 let lines = getline (1 , line (' $' ))
193193 if g: syntastic_java_javac_config_file_enabled
194194 " save config file lines
195- call writefile (lines , g: syntastic_java_javac_config_file )
195+ call writefile (lines , expand ( g: syntastic_java_javac_config_file) )
196196 endif
197197 let &modified = 0
198198endfunction
@@ -202,8 +202,8 @@ function! s:EditConfig()
202202 let winnr = bufwinnr (' ^' . command . ' $' )
203203 if winnr < 0
204204 let lines = []
205- if filereadable (g: syntastic_java_javac_config_file )
206- let lines = readfile (g: syntastic_java_javac_config_file )
205+ if filereadable (expand ( g: syntastic_java_javac_config_file) )
206+ let lines = readfile (expand ( g: syntastic_java_javac_config_file) )
207207 endif
208208 execute (len (lines ) + 5 ) . ' sp ' . fnameescape (command )
209209
@@ -329,7 +329,7 @@ function! s:MavenOutputDirectory()
329329 endif
330330
331331 if has (' win32unix' )
332- let output_dir= s: CygwinPath (output_dir)
332+ let output_dir = s: CygwinPath (output_dir)
333333 endif
334334 return output_dir
335335 endif
@@ -408,7 +408,7 @@ function! SyntaxCheckers_java_javac_GetLocList() dict
408408 let fname = fnameescape (expand ( ' %:p:h' ) . sep . expand ( ' %:t' ))
409409
410410 if has (' win32unix' )
411- let fname = s: CygwinPath (fname)
411+ let fname = s: CygwinPath (fname)
412412 endif
413413
414414 let makeprg = self .makeprgBuild ({
0 commit comments