src/Pure/System/build.scala
changeset 48339 62570361e608
parent 48337 9c7f8e5805b4
child 48340 6f4fc030882a
--- a/src/Pure/System/build.scala	Wed Jul 18 17:22:59 2012 +0200
+++ b/src/Pure/System/build.scala	Wed Jul 18 17:27:28 2012 +0200
@@ -166,6 +166,11 @@
         val full_name =
           if (entry.reset) entry.name
           else parent.name + "-" + entry.name
+
+        if (entry.name == "") error("Bad session name")
+        if (infos.exists(_.name == full_name))
+          error("Duplicate session name: " + quote(full_name))
+
         val path =
           entry.path match {
             case Some(p) => Path.explode(p)
@@ -175,6 +180,7 @@
         val info =
           Session_Info(dir + path, full_name, entry.parent, entry.description,
             entry.options, thys, entry.files)
+
         infos += info
       }
       catch {