From dea75107e1c7ead9983271309d9e8a2e4764afea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Thu, 17 Jun 2021 13:00:17 +0200 Subject: [PATCH] Add doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- otherlibs/stdune-unstable/path.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/otherlibs/stdune-unstable/path.ml b/otherlibs/stdune-unstable/path.ml index 2e4b3070998..ae4761b0b47 100644 --- a/otherlibs/stdune-unstable/path.ml +++ b/otherlibs/stdune-unstable/path.ml @@ -302,6 +302,10 @@ end = struct User_error.raise ?loc:error_loc [ Pp.textf "path outside the workspace: %s from %s" path (to_string t) ] + (* Check whether a path is in canonical form: no '.' or '..' components, no + repeated '/' components, no backslashes '\\' (on Windows only), and not + ending in a slash '/'. *) + let is_canonicalized = let rec before_slash s i = if i < 0 then