diff options
-rw-r--r-- | libimagentrylist/src/listers/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libimagentrylist/src/listers/path.rs b/libimagentrylist/src/listers/path.rs index 8b982315..cfe67b65 100644 --- a/libimagentrylist/src/listers/path.rs +++ b/libimagentrylist/src/listers/path.rs @@ -3,6 +3,7 @@ use std::io::Write; use lister::Lister; use result::Result; +use error::MapErrInto; use libimagstore::store::FileLockEntry; use libimagutil::iter::FoldResult; @@ -26,12 +27,11 @@ impl Lister for PathLister { fn list<'a, I: Iterator<Item = FileLockEntry<'a>>>(&self, entries: I) -> Result<()> { use error::ListError as LE; use error::ListErrorKind as LEK; - use std::path::PathBuf; entries.fold_defresult(|entry| { Ok(entry.get_location().clone()) + .and_then(|pb| pb.into_pathbuf().map_err_into(LEK::FormatError)) .and_then(|pb| { - let pb : PathBuf = pb.into(); if self.absolute { pb.canonicalize().map_err(|e| LE::new(LEK::FormatError, Some(Box::new(e)))) } else { |