Skip to content

Commit

Permalink
Fix incorrect path normalization in coqdep on //..
Browse files Browse the repository at this point in the history
`x/y//..` would get normalized to `x/y` instead of `x`

Fix coq#19862
  • Loading branch information
SkySkimmer committed Nov 29, 2024
1 parent 8939dfb commit dacfa6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/coqdep/lib/file_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let to_relative_path : string -> string = fun full_path ->
List.fold_left add_parent path cwd

let normalize_path : string -> string = fun path ->
let re_delim = if Sys.win32 then "[/\\]" else "/" in
let re_delim = if Sys.win32 then "[/\\]+" else "/+" in
let path = Str.split_delim (Str.regexp re_delim) path in
let rec normalize acc path =
match (path, acc) with
Expand Down

0 comments on commit dacfa6c

Please sign in to comment.