Permalink
Browse files

closes #58: Create .settings folder only if there are settings

  • Loading branch information...
1 parent fe9e372 commit d5a8fa062632ad1dc172513c81ffefb00080eec3 Heiko Seeberger committed Nov 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/scala/com/typesafe/sbteclipse/SbtEclipsePlugin.scala
@@ -66,7 +66,6 @@ private object SbtEclipse {
for ((file, project, classpath, settings) <- files) {
savePretty(project, file / ".project")
savePretty(classpath, file / ".classpath")
- (file / ".settings").mkdirs()
save(settings, file / ".settings" / "org.scala-ide.sdt.core.prefs")
}
logInfo("Successfully created Eclipse project files.")
@@ -275,6 +274,7 @@ private object SbtEclipse {
def save(settings: Seq[String], file: File): Unit = {
if (!settings.isEmpty) {
+ file.getParentFile.mkdirs()
val out = new PrintWriter(new FileWriter(file))
try settings map settingToEclipseFormat foreach out.println finally out.close()
}

0 comments on commit d5a8fa0

Please sign in to comment.