summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/CompileSocket.scala
diff options
context:
space:
mode:
authorCody Mello <cody@cs.brown.edu>2013-01-26 14:19:45 -0500
committerCody Mello <cody@cs.brown.edu>2013-01-26 17:53:54 -0500
commite0cf65101b601913aaf9e0e1624a022d6cb1b945 (patch)
tree2f5eb64b21aa8c15d9b723d797e9a2512d3b702c /src/compiler/scala/tools/nsc/CompileSocket.scala
parent884737c75dc7f2765a3d769342ecc832deeddb81 (diff)
downloadscala-e0cf65101b601913aaf9e0e1624a022d6cb1b945.tar.gz
scala-e0cf65101b601913aaf9e0e1624a022d6cb1b945.tar.bz2
scala-e0cf65101b601913aaf9e0e1624a022d6cb1b945.zip
SI-4733 - fsc no longer creates a single temp directory for all users.
fsc previously created a single temporary directory called "scala-devel". This is an issue, since the directory belongs to whoever created the directory. Depending on the user's umask, this directory may only be writable for the creator. This causes problems for any other users who then try to use fsc or invoke fsc indirectly. Other programs usually solve this issue by creating a separate directory for each user, either by appending the username to a base directory name or creating a new direcotory with a random name with a program like "mktemp". This commit changes CompileSocket to use the first method. Fixes SI-4733 backport to 2.10.x
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompileSocket.scala')
-rw-r--r--src/compiler/scala/tools/nsc/CompileSocket.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileSocket.scala b/src/compiler/scala/tools/nsc/CompileSocket.scala
index 9a3e8d1530..4051bda914 100644
--- a/src/compiler/scala/tools/nsc/CompileSocket.scala
+++ b/src/compiler/scala/tools/nsc/CompileSocket.scala
@@ -72,7 +72,7 @@ class CompileSocket extends CompileOutputCommon {
/** A temporary directory to use */
val tmpDir = {
val udir = Option(Properties.userName) getOrElse "shared"
- val f = (Path(Properties.tmpDir) / "scala-devel" / udir).createDirectory()
+ val f = (Path(Properties.tmpDir) / ("scala-devel" + udir)).createDirectory()
if (f.isDirectory && f.canWrite) {
info("[Temp directory: " + f + "]")