fix: Only treat PathBuf ending parts that match one of our extensions as file names
parent
25cc396f5e
commit
0415d4a186
|
@ -330,7 +330,14 @@ impl From<PathRepresentation> for DirsAndFileName {
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let maybe_file_name = match parts.pop() {
|
let maybe_file_name = match parts.pop() {
|
||||||
Some(file) if file.0.contains('.') => Some(file),
|
Some(file)
|
||||||
|
if !file.0.starts_with('.')
|
||||||
|
&& (file.0.ends_with(".json")
|
||||||
|
|| file.0.ends_with(".parquet")
|
||||||
|
|| file.0.ends_with(".segment")) =>
|
||||||
|
{
|
||||||
|
Some(file)
|
||||||
|
}
|
||||||
Some(dir) => {
|
Some(dir) => {
|
||||||
parts.push(dir);
|
parts.push(dir);
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in New Issue