Skip to content

Commit b3037ff

Browse files
author
Devdutt Shenoi
committed
match with regex
1 parent 78a141e commit b3037ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/parseable/streams.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ impl Stream {
225225
.flatten()
226226
.map(|file| file.path())
227227
.filter(|path| {
228-
path.file_name().is_some_and(|f| {
229-
let filename = f.to_string_lossy();
230-
filename.ends_with(ARROW_FILE_EXTENSION) && !filename.contains("part")
231-
})
228+
let Some(file_name) = path.file_name().and_then(|f| f.to_str()) else {
229+
return false;
230+
};
231+
ARROWS_NAME_STRUCTURE.is_match(file_name)
232232
})
233233
.sorted_by_key(|f| f.metadata().unwrap().modified().unwrap())
234234
.collect();

0 commit comments

Comments
 (0)