Fix unix build errors

This commit is contained in:
Caelan Sayler
2025-05-18 15:30:09 +01:00
committed by Caelan
parent 1d29cf0214
commit 3e46d13b60
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,6 @@
use anyhow::{anyhow, bail, Result};
use mtzip::level::CompressionLevel;
use ripunzip::{NullProgressReporter, UnzipEngine, UnzipOptions};
use std::os::windows::fs::MetadataExt;
use std::{
collections::HashSet,
fs, io,
@@ -127,7 +126,7 @@ pub fn delta<P1: AsRef<Path>, P2: AsRef<Path>, P3: AsRef<Path>>(
visited_paths.insert(file_without_extension);
if fs::metadata(&patch_file_path)?.file_size() == 0 {
if fs::metadata(&patch_file_path)?.len() == 0 {
// file has not changed, so we can continue.
continue;
}

View File

@@ -112,6 +112,7 @@ pub fn init_logging(
}
/// Initialize a Trace / Console logger for the current process.
#[cfg(feature = "file-logging")]
pub fn trace_logger() {
TermLogger::init(LevelFilter::Trace, get_config(None), TerminalMode::Mixed, ColorChoice::Never).unwrap();
}