better error msg if unable to open sample file dir

This commit is contained in:
Scott Lamb 2017-01-07 19:48:40 -08:00
parent 3e58230813
commit db3d78ba69

View File

@ -102,7 +102,8 @@ impl Fd {
impl SampleFileDir {
pub fn new(path: &str, db: Arc<db::Database>) -> Result<Arc<SampleFileDir>, Error> {
let fd = Fd::open(path)?;
let fd = Fd::open(path)
.map_err(|e| Error::new(format!("unable to open sample file dir {}: {}", path, e)))?;
Ok(Arc::new(SampleFileDir{
db: db,
fd: fd,