src/Pure/General/file.scala
changeset 82147 3f7c8e6d3481
parent 82142 508a673c87ac
child 82276 d22e9c5b5dc6
--- a/src/Pure/General/file.scala	Wed Feb 12 14:26:43 2025 +0100
+++ b/src/Pure/General/file.scala	Wed Feb 12 14:28:32 2025 +0100
@@ -123,6 +123,9 @@
     else None
   }
 
+  def perhaps_relative_path(base: Path, other: Path): Path =
+    relative_path(base, other).getOrElse(other)
+
 
   /* bash path */