From 0e1b1765aee8e498356efcdc8c96239d5c295619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 23 Feb 2022 15:56:22 +0100 Subject: [PATCH] skip over paths which failed to canonicalize --- src/filesystem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem.rs b/src/filesystem.rs index 3c9aeb3..f7dc084 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -144,7 +144,7 @@ fn rescan_vault_inner>( .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();