Skip to content

Commit

Permalink
Protect .cargo-ok on case-insensitive file systems
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Mar 30, 2024
1 parent 3b43aa8 commit 53c492e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cargo/sources/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,8 @@ impl<'gctx> RegistrySource<'gctx> {
// Prevent unpacking the lockfile from the crate itself.
if entry_path
.file_name()
.map_or(false, |p| p == PACKAGE_SOURCE_LOCK)
.and_then(|p| p.to_str())
.is_some_and(|p| PACKAGE_SOURCE_LOCK.eq_ignore_ascii_case(p))
{
continue;
}
Expand Down

0 comments on commit 53c492e

Please sign in to comment.