more strict check: avoid confusion of Path.basic with Path.current / Path.parent;
authorwenzelm
Sun, 30 Dec 2018 15:36:43 +0100
changeset 69548 415dc92050a6
parent 69547 47c589d3af77
child 69549 612a02019f48
more strict check: avoid confusion of Path.basic with Path.current / Path.parent;
src/Pure/General/path.ML
src/Pure/General/path.scala
--- a/src/Pure/General/path.ML	Sun Dec 30 15:27:59 2018 +0100
+++ b/src/Pure/General/path.ML	Sun Dec 30 15:36:43 2018 +0100
@@ -53,7 +53,7 @@
 
 fun err_elem msg s = error (msg ^ " path element " ^ quote s);
 
-val illegal_elem = ["", "~", "~~"];
+val illegal_elem = ["", "~", "~~", ".", ".."];
 val illegal_char = ["/", "\\", "$", ":", "\"", "'"];
 
 val check_elem = tap (fn s =>
--- a/src/Pure/General/path.scala	Sun Dec 30 15:27:59 2018 +0100
+++ b/src/Pure/General/path.scala	Sun Dec 30 15:36:43 2018 +0100
@@ -26,7 +26,7 @@
   private def err_elem(msg: String, s: String): Nothing =
     error(msg + " path element " + quote(s))
 
-  private val illegal_elem = Set("", "~", "~~")
+  private val illegal_elem = Set("", "~", "~~", ".", "..")
   private val illegal_char = "/\\$:\"'"
 
   private def check_elem(s: String): String =