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")
|
def sources = File.createTempFile(name,".lst")
|
||||||
sources.deleteOnExit()
|
sources.deleteOnExit()
|
||||||
def sourcesWriter = sources.newWriter()
|
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()
|
sourcesWriter.close()
|
||||||
args = ["-output", output,
|
args = ["-output", output,
|
||||||
"@${sources.absolutePath}",
|
"@${sources.absolutePath}",
|
||||||
|
|||||||
Reference in New Issue
Block a user