fix: add DigestType and get_digest_engine imports, fix item_path scope

This commit is contained in:
Andrew Phillips (aider)
2025-05-13 18:30:31 -03:00
parent 9a99bbd8bc
commit d8e0cb9758

View File

@@ -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() {