Fix: Do not check whether path exists - check whether its a file

This fixes a bug introduced in 195d921218
where we didn't check whether the path is actually a file.
This commit is contained in:
Matthias Beyer 2018-05-02 14:04:59 +02:00
parent c4d10c7e4f
commit 888b31377e

View file

@ -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 },