diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-07-22 17:00:34 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-07-22 17:00:34 +0000 |
commit | a41f6eefc591876f5bf27b7eff5a5cd45e93a4b6 (patch) | |
tree | 679f1b30c039521bff12992c91d333acd159c4a4 | |
parent | b37372ea5cac3308e2cc63953e685e04eac5e1a2 (diff) | |
download | scala-a41f6eefc591876f5bf27b7eff5a5cd45e93a4b6.tar.gz scala-a41f6eefc591876f5bf27b7eff5a5cd45e93a4b6.tar.bz2 scala-a41f6eefc591876f5bf27b7eff5a5cd45e93a4b6.zip |
when looking for a temporary directory, try to ...
when looking for a temporary directory, try to create the necessary
parent directories
-rw-r--r-- | src/compiler/scala/tools/nsc/CompileSocket.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileSocket.scala b/src/compiler/scala/tools/nsc/CompileSocket.scala index 85c2e273f4..3c6f6d1e93 100644 --- a/src/compiler/scala/tools/nsc/CompileSocket.scala +++ b/src/compiler/scala/tools/nsc/CompileSocket.scala @@ -77,9 +77,12 @@ class CompileSocket { Some(fulldir) } - /** Test if file f is a writable directory */ - def isDirWritable(f: File): Boolean = + /** Try to create directory f, and then see if it can + * be written into. */ + def isDirWritable(f: File): Boolean = { + f.mkdirs() f.isDirectory && f.canWrite + } val potentials = for { |