Skip to content

Commit

Permalink
Use file stem when parsing cached wheel names (#7773)
Browse files Browse the repository at this point in the history
## Summary

I noticed that we were including `http` (the file extension) in the
platform tags when reading from the cache:

![Screenshot 2024-09-28 at 9 40
15 PM](https://github.com/user-attachments/assets/d80ed351-1257-42b5-8292-0b11a50c767d)

Probably harmless, but wrong.
  • Loading branch information
charliermarsh authored Sep 29, 2024
1 parent 884b5a3 commit c415251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/uv-distribution/src/index/cached_wheel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl CachedWheel {
let path = path.as_ref();

// Determine the wheel filename.
let filename = path.file_name()?.to_str()?;
let filename = path.file_stem()?.to_str()?;
let filename = WheelFilename::from_stem(filename).ok()?;

// Read the pointer.
Expand All @@ -121,7 +121,7 @@ impl CachedWheel {
let path = path.as_ref();

// Determine the wheel filename.
let filename = path.file_name()?.to_str()?;
let filename = path.file_stem()?.to_str()?;
let filename = WheelFilename::from_stem(filename).ok()?;

// Read the pointer.
Expand Down

0 comments on commit c415251

Please sign in to comment.