From f44f16755aa8ce48b5da13f07f366dec2530f90b Mon Sep 17 00:00:00 2001 From: Anant Vindal Date: Thu, 18 Jun 2026 14:14:03 +0530 Subject: [PATCH] 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` --- src/parseable/streams.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/parseable/streams.rs b/src/parseable/streams.rs index cca7c95c1..8ebcdaea0 100644 --- a/src/parseable/streams.rs +++ b/src/parseable/streams.rs @@ -529,7 +529,11 @@ impl Stream { dir.flatten() .map(|file| file.path()) - .filter(|file| file.extension().is_some_and(|ext| ext.eq("schema"))) + .filter(|file| { + file.file_name() + .and_then(|n| n.to_str()) + .is_some_and(|n| n.ends_with(".schema")) + }) .collect() } @@ -539,8 +543,11 @@ impl Stream { let mut schemas: Vec = Vec::new(); for file in dir.flatten() { - if let Some(ext) = file.path().extension() - && ext.eq("schema") + if file + .path() + .file_name() + .and_then(|n| n.to_str()) + .is_some_and(|n| n.ends_with(".schema")) { let file = File::open(file.path())?;