fix: add DigestType and get_digest_engine imports, fix item_path scope
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user