Escape file names that contain whitespaces
This commit is contained in:
committed by
Pavel Punegov
parent
d029e3b730
commit
0dab2df25c
@@ -112,7 +112,11 @@ abstract class KonanTest extends JavaExec {
|
||||
def sources = File.createTempFile(name,".lst")
|
||||
sources.deleteOnExit()
|
||||
def sourcesWriter = sources.newWriter()
|
||||
filesToCompile.each {sourcesWriter << "$it\n"}
|
||||
filesToCompile.each { f ->
|
||||
sourcesWriter.write(f.chars().any { Character.isWhitespace(it) }
|
||||
? "\"$f\"\n" // escape file name
|
||||
: "$f\n")
|
||||
}
|
||||
sourcesWriter.close()
|
||||
args = ["-output", output,
|
||||
"@${sources.absolutePath}",
|
||||
|
||||
Reference in New Issue
Block a user