Commit ca15ad69 authored by Andre Maroneze's avatar Andre Maroneze 💬 Committed by Virgile Prevosto
Browse files

[Filepath] robustify to_base_uri

parent 17b9a5b7
......@@ -286,7 +286,9 @@ module Normalized = struct
Buffer.contents buf in
let uri =
try
String.sub uri 1 (String.length uri - 1)
if String.get uri 0 = '/' then
String.sub uri 1 (String.length uri - 1)
else uri
with Invalid_argument _ -> uri
in
res, uri
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment