From 4a166b55727b26a161f094a5597d6b2b6ec2174a Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 23 Jun 2026 10:42:43 +0530 Subject: [PATCH] fix: ignore legacy Electron window-state.json files when loading notes --- src-tauri/src/commands/fs.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src-tauri/src/commands/fs.rs b/src-tauri/src/commands/fs.rs index 82d3c5a..e91cf3c 100644 --- a/src-tauri/src/commands/fs.rs +++ b/src-tauri/src/commands/fs.rs @@ -55,6 +55,11 @@ fn walk_dir(dir: &Path, notes: &mut Vec, base_path: &Path) { } else if path.is_file() { let ext = path.extension().and_then(|e| e.to_str()).unwrap_or(""); if ext == "md" || ext == "json" { + // Ignore legacy Electron window-state files + if path.file_name().and_then(|n| n.to_str()) == Some("window-state.json") { + continue; + } + if let Ok(content) = fs::read_to_string(&path) { let metadata = fs::metadata(&path).ok(); let mtime = metadata