diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-08 22:59:25 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-08 22:59:25 +0100 |
commit | 6ea00af6895e111320a2047f43f94792a46b6cea (patch) | |
tree | 8a941fa08834e5dd512f3136b3c9b836ebf1b3d4 /ale_linters/java | |
parent | 28c6ec9cad3064966ff70c9da95c96364118eb57 (diff) | |
download | ale-6ea00af6895e111320a2047f43f94792a46b6cea.zip |
#540 Fix shell escaping pretty much everywhere
Diffstat (limited to 'ale_linters/java')
-rw-r--r-- | ale_linters/java/javac.vim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ale_linters/java/javac.vim b/ale_linters/java/javac.vim index 5a109997..2966d069 100644 --- a/ale_linters/java/javac.vim +++ b/ale_linters/java/javac.vim @@ -41,14 +41,13 @@ endfunction function! s:BuildClassPathOption(buffer, import_paths) abort " Filter out lines like [INFO], etc. let l:class_paths = filter(a:import_paths[:], 'v:val !~# ''[''') - call map(l:class_paths, 'fnameescape(v:val)') call extend( \ l:class_paths, \ split(ale#Var(a:buffer, 'java_javac_classpath'), s:classpath_sep), \) return !empty(l:class_paths) - \ ? '-cp ' . join(l:class_paths, s:classpath_sep) + \ ? '-cp ' . shellescape(join(l:class_paths, s:classpath_sep)) \ : '' endfunction @@ -65,7 +64,7 @@ function! ale_linters#java#javac#GetCommand(buffer, import_paths) abort let l:src_dir = ale#path#FindNearestDirectory(a:buffer, 'src/main/java') if !empty(l:src_dir) - let l:sp_option = '-sourcepath ' . fnameescape(l:src_dir) + let l:sp_option = '-sourcepath ' . shellescape(l:src_dir) endif " Create .class files in a temporary directory, which we will delete later. @@ -74,7 +73,7 @@ function! ale_linters#java#javac#GetCommand(buffer, import_paths) abort return 'javac -Xlint' \ . ' ' . l:cp_option \ . ' ' . l:sp_option - \ . ' -d ' . fnameescape(l:class_file_directory) + \ . ' -d ' . shellescape(l:class_file_directory) \ . ' ' . ale#Var(a:buffer, 'java_javac_options') \ . ' %t' endfunction |