Use StoreId::from_full_path() in GlobStoreIdIterator::next()

This commit is contained in:
Matthias Beyer 2016-09-05 18:22:55 +02:00
parent 8362b077e2
commit 364ad01179

View file

@ -1522,11 +1522,7 @@ mod glob_store_iter {
.and_then(|o| { .and_then(|o| {
debug!("GlobStoreIdIterator::next() => {:?}", o); debug!("GlobStoreIdIterator::next() => {:?}", o);
o.map_err_into(SEK::StoreIdHandlingError) o.map_err_into(SEK::StoreIdHandlingError)
.and_then(|p| { .and_then(|p| StoreId::from_full_path(&self.store_path, p))
let p = try!(p.strip_prefix(&self.store_path)
.map_err_into(SEK::StoreIdHandlingError));
StoreId::new(Some(self.store_path.clone()), PathBuf::from(p))
})
.map_err(|e| { .map_err(|e| {
debug!("GlobStoreIdIterator error: {:?}", e); debug!("GlobStoreIdIterator error: {:?}", e);
trace_error(&e); trace_error(&e);