src/backup/chunk_store.rs: use ? insteadf of unwrap

This commit is contained in:
Dietmar Maurer 2020-09-10 06:37:37 +02:00
parent 597427afaf
commit 14db8b52dc
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ impl ChunkStore {
if let Ok(stat) = fstatat(dirfd, filename, nix::fcntl::AtFlags::AT_SYMLINK_NOFOLLOW) {
if bad {
// filename validity checked in iterator
let orig_filename = std::ffi::CString::new(&filename.to_bytes()[..64]).unwrap();
let orig_filename = std::ffi::CString::new(&filename.to_bytes()[..64])?;
match fstatat(
dirfd,
orig_filename.as_c_str(),