Skip to content

Commit

Permalink
Remove path from index when file not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
naaive committed Apr 15, 2022
1 parent ead7073 commit 715af0a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src-tauri/src/idx_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,8 @@ impl IdxStore {
let mut file_views = Vec::new();

let mut uniques: HashSet<String> = HashSet::new();

for path in paths {
let path = utils::norm(&path);
for path0 in paths {
let path = utils::norm(&path0);
match fs::metadata(path.clone()) {
Ok(meta) => {
if !uniques.contains(&path) {
Expand Down Expand Up @@ -331,7 +330,9 @@ impl IdxStore {
is_dir: meta.is_dir(),
});
}
Err(_) => {}
Err(_) => {
self._del(path0.clone());
}
}
}

Expand Down

0 comments on commit 715af0a

Please sign in to comment.