Skip to content

Commit

Permalink
fix: Fix glob resolution for Hugging Face (#17958)
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion authored Jul 31, 2024
1 parent 880e2e6 commit 6065465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/polars-io/src/path_utils/hugging_face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ pub(super) async fn expand_paths_hf(
let bytes = bytes?;
let bytes = bytes.as_ref();
entries.extend(try_parse_api_response(bytes)?.into_iter().filter(|x| {
matcher.is_matching(x.path.as_str()) && (!x.is_file() || x.size > 0)
!x.is_file() || (x.size > 0 && matcher.is_matching(x.path.as_str()))
}));
}
} else {
Expand Down

0 comments on commit 6065465

Please sign in to comment.