diff options
author | Paul Phillips <paulp@improving.org> | 2011-11-13 01:56:28 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-11-13 01:56:28 +0000 |
commit | bc2bd6e67afd96e99c48347e69d9dd9a4743b808 (patch) | |
tree | 436222fffd562573d9ef2edab476e55786ef53d5 /src | |
parent | b6a300f3ac965285583ed39348ad43abb6df019e (diff) | |
download | scala-bc2bd6e67afd96e99c48347e69d9dd9a4743b808.tar.gz scala-bc2bd6e67afd96e99c48347e69d9dd9a4743b808.tar.bz2 scala-bc2bd6e67afd96e99c48347e69d9dd9a4743b808.zip |
More defense against spaces in paths.
Closes SI-3047.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/ant/sabbus/Settings.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/sabbus/Settings.scala b/src/compiler/scala/tools/ant/sabbus/Settings.scala index 3c02a86c55..4d4e3cdb08 100644 --- a/src/compiler/scala/tools/ant/sabbus/Settings.scala +++ b/src/compiler/scala/tools/ant/sabbus/Settings.scala @@ -62,10 +62,12 @@ class Settings { def more = moreBf.get def more_=(s: String): this.type = { moreBf = Some(s); this } + private def q(o: AnyRef) = "\"" + o.toString.replace("""\""", """\\""") + "\"" + def toArgs: List[String] = (if (!gBf.isEmpty) "-g:"+g :: Nil else Nil) ::: (if (uncheckedBf) "-unchecked" :: Nil else Nil) ::: - (if (!classpathBf.isEmpty) "-classpath" :: classpath.toString :: Nil else Nil) ::: + (if (!classpathBf.isEmpty) "-classpath" :: q(classpath) :: Nil else Nil) ::: (if (!sourcepathBf.isEmpty) "-sourcepath" :: sourcepath.toString :: Nil else Nil) ::: (if (!sourcedirBf.isEmpty) "-Xsourcedir" :: sourcedir.toString :: Nil else Nil) ::: (if (!bootclasspathBf.isEmpty) "-bootclasspath" :: bootclasspath.toString :: Nil else Nil) ::: |