Skip to content

Commit 396baee

Browse files
committed
fix: hide tauri window-state.json from the note list
1 parent fe7e858 commit 396baee

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src-tauri/src/commands

src-tauri/src/commands/fs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ fn walk_dir(dir: &Path, notes: &mut Vec<Note>, base_path: &Path) -> Result<(), S
5454
if path.is_dir() {
5555
walk_dir(&path, notes, base_path)?;
5656
} else if path.is_file() {
57+
let file_name = path.file_name().and_then(|n| n.to_str()).unwrap_or("");
58+
if file_name == "window-state.json" || file_name == ".window-state" {
59+
continue;
60+
}
5761
let ext = path.extension().and_then(|e| e.to_str()).unwrap_or("");
5862
if ext == "md" || ext == "json" {
5963
let content = fs::read_to_string(&path)

0 commit comments

Comments
 (0)