mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-01-13 16:03:22 -05:00
better error msg if unable to open sample file dir
This commit is contained in:
parent
3e58230813
commit
db3d78ba69
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user