From 85f7975fd2b2849d614e781848ce32c658d9f72c Mon Sep 17 00:00:00 2001 From: Simon Lin Date: Wed, 31 Jul 2024 21:55:37 +1000 Subject: [PATCH] fix: Fix glob resolution for Hugging Face --- crates/polars-io/src/path_utils/hugging_face.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/polars-io/src/path_utils/hugging_face.rs b/crates/polars-io/src/path_utils/hugging_face.rs index 3e8f701a21ed..4854ad3cf870 100644 --- a/crates/polars-io/src/path_utils/hugging_face.rs +++ b/crates/polars-io/src/path_utils/hugging_face.rs @@ -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 {