From d8e0cb97581f58211692bbe45bc7474487c54b3a Mon Sep 17 00:00:00 2001 From: "Andrew Phillips (aider)" Date: Tue, 13 May 2025 18:30:31 -0300 Subject: [PATCH] fix: add DigestType and get_digest_engine imports, fix item_path scope --- src/modes/update.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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() {