Skip to content

Commit

Permalink
fixup! lint: add E72 for relative path on extra-files
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Apr 11, 2024
1 parent 7cf86d5 commit 1351833
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/state/opamFileTools.ml
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ let t_lint ?check_extra_files ?(check_upstream=false) ?(all=false) t =
("file" | "path" | "local" | "rsync") -> true
| _, _ -> false)
&& (Filename.is_relative u.path
|| OpamFilename.might_escape u.path))
|| OpamFilename.might_escape ~sep:`Unix u.path))
(all_urls t)
in
cond 65 `Error
Expand Down Expand Up @@ -947,7 +947,8 @@ let t_lint ?check_extra_files ?(check_upstream=false) ?(all=false) t =
| Some extra_files ->
List.filter_map (fun (base, _) ->
let path = OpamFilename.Base.to_string base in
if OpamFilename.might_escape path then Some path else None)
if OpamFilename.might_escape ~sep:`Unix path then
Some path else None)
extra_files
in
cond 72 `Error
Expand Down

0 comments on commit 1351833

Please sign in to comment.