Skip to content

Commit fa2c4bd

Browse files
committed
bugfix: schema updation issue
in standalone mode, the `.schema` file from staging wasn't getting pushed to storage due to the improper usage of `path().extension()` function. It was always returning `None`. Instead of checking whether the extension is `schema`, check if the file path ends with `.schema`
1 parent 7d1d9a9 commit fa2c4bd

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/parseable/streams.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ impl Stream {
529529

530530
dir.flatten()
531531
.map(|file| file.path())
532-
.filter(|file| file.extension().is_some_and(|ext| ext.eq("schema")))
532+
.filter(|file| file.ends_with(".schema"))
533533
.collect()
534534
}
535535

@@ -539,9 +539,7 @@ impl Stream {
539539
let mut schemas: Vec<Schema> = Vec::new();
540540

541541
for file in dir.flatten() {
542-
if let Some(ext) = file.path().extension()
543-
&& ext.eq("schema")
544-
{
542+
if file.path().ends_with(".schema") {
545543
let file = File::open(file.path())?;
546544

547545
schemas.push(serde_json::from_reader(file)?);

0 commit comments

Comments
 (0)