skip over paths which failed to canonicalize

feat/vaults
Tomáš Mládek 2022-02-23 15:56:22 +01:00
parent 8f80779ce6
commit 0e1b1765ae
No known key found for this signature in database
GPG Key ID: 65E225C8B3E2ED8A
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ fn rescan_vault_inner<D: Borrow<UpEndDatabase>>(
.follow_links(true)
.into_iter()
.filter_map(|e| e.ok())
.map(|e| fs::canonicalize(e.into_path()).unwrap())
.filter_map(|e| fs::canonicalize(e.into_path()).ok())
.filter(|e| e.is_file())
.filter(|e| !e.starts_with(&absolute_dir_path.join(UPEND_SUBDIR)))
.collect();