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::error::ErrorKind;
|
||||||
use clap::Command;
|
use clap::Command;
|
||||||
use log::{debug, info};
|
use log::{debug, info};
|
||||||
use rusqlite::Connection;
|
use crate::digest_engine::{DigestType, get_digest_engine};
|
||||||
|
|
||||||
pub fn mode_update(
|
pub fn mode_update(
|
||||||
cmd: &mut Command,
|
cmd: &mut Command,
|
||||||
@@ -40,8 +40,11 @@ pub fn mode_update(
|
|||||||
|
|
||||||
if item.size.is_none() {
|
if item.size.is_none() {
|
||||||
info!("Updating unknown stream size");
|
info!("Updating unknown stream size");
|
||||||
let mut item_path = data_path.clone();
|
let item_path = {
|
||||||
item_path.push(item.id.unwrap().to_string());
|
let mut path = data_path.clone();
|
||||||
|
path.push(item.id.unwrap().to_string());
|
||||||
|
path
|
||||||
|
};
|
||||||
let item_file_metadata = item_path.metadata();
|
let item_file_metadata = item_path.metadata();
|
||||||
|
|
||||||
if item_file_metadata.is_ok() {
|
if item_file_metadata.is_ok() {
|
||||||
|
|||||||
Reference in New Issue
Block a user