summaryrefslogtreecommitdiffstats
path: root/src/filestore/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/filestore/path.rs')
-rw-r--r--src/filestore/path.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/filestore/path.rs b/src/filestore/path.rs
index ca537bb..8c94d62 100644
--- a/src/filestore/path.rs
+++ b/src/filestore/path.rs
@@ -50,12 +50,10 @@ impl StoreRoot {
if join.is_file() {
Ok(FullArtifactPath(&self, ap))
+ } else if join.is_dir() {
+ Err(anyhow!("Cannot load non-file path: {}", join.display()))
} else {
- if join.is_dir() {
- Err(anyhow!("Cannot load non-file path: {}", join.display()))
- } else {
- Err(anyhow!("Path does not exist: {}", join.display()))
- }
+ Err(anyhow!("Path does not exist: {}", join.display()))
}
}