We can call StoreId::{exists, is_file} here instead of converting to PathBuf
This commit is contained in:
parent
82f08c6021
commit
4eaa0c2147
1 changed files with 4 additions and 5 deletions
|
@ -53,11 +53,10 @@ impl NonMutableHookDataAccessor for LinkedEntriesExistHook {
|
||||||
let _ = fle.get_internal_links()
|
let _ = fle.get_internal_links()
|
||||||
.map(|links| {
|
.map(|links| {
|
||||||
for link in links {
|
for link in links {
|
||||||
let path : PathBuf = link.into();
|
if !link.exists() {
|
||||||
if !path.exists() {
|
warn!("File link does not exist: {:?} -> {:?}", fle.get_location(), link);
|
||||||
warn!("File link does not exist: {:?} -> {:?}", fle.get_location(), path);
|
} else if !link.is_file() {
|
||||||
} else if !path.is_file() {
|
warn!("File link is not a file: {:?} -> {:?}", fle.get_location(), link);
|
||||||
warn!("File link is not a file: {:?} -> {:?}", fle.get_location(), path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue