diff --git a/src/modes/update.rs b/src/modes/update.rs index 8e0e84d..0c78651 100644 --- a/src/modes/update.rs +++ b/src/modes/update.rs @@ -7,7 +7,7 @@ use crate::db; use clap::error::ErrorKind; use clap::Command; use log::{debug, info}; -use rusqlite::Connection; +use crate::digest_engine::{DigestType, get_digest_engine}; pub fn mode_update( cmd: &mut Command, @@ -40,8 +40,11 @@ pub fn mode_update( if item.size.is_none() { info!("Updating unknown stream size"); - let mut item_path = data_path.clone(); - item_path.push(item.id.unwrap().to_string()); + let item_path = { + let mut path = data_path.clone(); + path.push(item.id.unwrap().to_string()); + path + }; let item_file_metadata = item_path.metadata(); if item_file_metadata.is_ok() {