From 644dfe2d197541c1f150a6e301d4e71553bccade Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Tue, 31 Mar 2026 19:57:33 -0300 Subject: [PATCH] fix: Improve .gbdialog file detection for nested paths --- src/drive/local_file_monitor.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/drive/local_file_monitor.rs b/src/drive/local_file_monitor.rs index 96f1bbc9..abcc1e29 100644 --- a/src/drive/local_file_monitor.rs +++ b/src/drive/local_file_monitor.rs @@ -166,13 +166,18 @@ impl LocalFileMonitor { } fn is_gbdialog_file(&self, path: &Path) -> bool { - // Check if path is something like /opt/gbo/data/*.gbai/.gbdialog/*.bas + // Check if path is something like /opt/gbo/data/*.gbai/*.gbdialog/*.bas path.extension() .and_then(|e| e.to_str()) .map(|e| e.eq_ignore_ascii_case("bas")) .unwrap_or(false) && path.ancestors() - .any(|p| p.ends_with(".gbdialog")) + .any(|p| { + p.file_name() + .and_then(|n| n.to_str()) + .map(|n| n.ends_with(".gbdialog")) + .unwrap_or(false) + }) } async fn scan_and_compile_all(&self) -> Result<(), Box> {