From 888b31377e96bbf90df400e5afad5a4e18f64ed2 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 2 May 2018 14:04:59 +0200 Subject: [PATCH] Fix: Do not check whether path exists - check whether its a file This fixes a bug introduced in 195d921218559f98844e52cca2ebdfe12fcf6b71 where we didn't check whether the path is actually a file. --- lib/core/libimagstore/src/file_abstraction/iter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/libimagstore/src/file_abstraction/iter.rs b/lib/core/libimagstore/src/file_abstraction/iter.rs index dea30a5e..2cf479b7 100644 --- a/lib/core/libimagstore/src/file_abstraction/iter.rs +++ b/lib/core/libimagstore/src/file_abstraction/iter.rs @@ -63,7 +63,7 @@ impl Iterator for StoreIdConstructingIterator { while let Some(next) = self.0.next() { match next { Err(e) => return Some(Err(e)), - Ok(next) => match self.2.exists(&next) { + Ok(next) => match self.2.is_file(&next) { Err(e) => return Some(Err(e)), Ok(true) => return Some(StoreId::from_full_path(&self.1, next)), Ok(false) => { continue },