src/Pure/System/isabelle_system.scala
changeset 48923 a2df77fcf1eb
parent 48550 97592027a2a8
child 49334 dbc169ddd404
     1.1 --- a/src/Pure/System/isabelle_system.scala	Fri Aug 24 19:35:44 2012 +0200
     1.2 +++ b/src/Pure/System/isabelle_system.scala	Fri Aug 24 20:41:47 2012 +0200
     1.3 @@ -124,19 +124,16 @@
     1.4    def posix_path(jvm_path: String): String = standard_system.posix_path(jvm_path)
     1.5  
     1.6  
     1.7 -  /* source files */
     1.8 +  /* source files of Isabelle/ML bootstrap */
     1.9  
    1.10 -  private def try_file(file: JFile) = if (file.isFile) Some(file) else None
    1.11 -
    1.12 -  def source_file(path: Path): Option[JFile] =
    1.13 +  def source_file(path: Path): Option[Path] =
    1.14    {
    1.15 -    if (path.is_absolute || path.is_current)
    1.16 -      try_file(platform_file(path))
    1.17 +    def check(p: Path): Option[Path] = if (p.is_file) Some(p) else None
    1.18 +
    1.19 +    if (path.is_absolute || path.is_current) check(path)
    1.20      else {
    1.21 -      val pure_file = (Path.explode("~~/src/Pure") + path).file
    1.22 -      if (pure_file.isFile) Some(pure_file)
    1.23 -      else if (getenv("ML_SOURCES") != "") try_file((Path.explode("$ML_SOURCES") + path).file)
    1.24 -      else None
    1.25 +      check(Path.explode("~~/src/Pure") + path) orElse
    1.26 +        (if (getenv("ML_SOURCES") == "") None else check(Path.explode("$ML_SOURCES") + path))
    1.27      }
    1.28    }
    1.29