^^ take that back, likely not necessary in this case

This commit is contained in:
Tomáš Mládek 2020-09-20 19:42:53 +02:00
parent ec9b31292e
commit 400b0d11f2

View file

@ -298,13 +298,7 @@ fn _reimport_directory<T: AsRef<Path>>(pool: &DbPool, directory: T) -> Result<()
.into_iter() .into_iter()
.filter_map(|e| e.ok()) .filter_map(|e| e.ok())
.filter(|e| e.path().is_file()) .filter(|e| e.path().is_file())
.filter_map(|e| match fs::canonicalize(e.path()) { .map(|e| fs::canonicalize(e.into_path()).unwrap())
Ok(_) => Some(e.into_path()),
Err(err) => {
error!("Could not canonicalize {}! {}", e.path().display(), err);
None
}
})
.collect(); .collect();
let absolute_path = fs::canonicalize(&directory)?; let absolute_path = fs::canonicalize(&directory)?;