From 3e46d13b60378f25030ebb2549a753d72757e018 Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Sun, 18 May 2025 15:30:09 +0100 Subject: [PATCH] Fix unix build errors --- src/bins/src/commands/patch.rs | 3 +-- src/lib-rust/src/logging.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bins/src/commands/patch.rs b/src/bins/src/commands/patch.rs index 8be29c3f..c8cf4d14 100644 --- a/src/bins/src/commands/patch.rs +++ b/src/bins/src/commands/patch.rs @@ -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, P2: AsRef, P3: AsRef>( 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; } diff --git a/src/lib-rust/src/logging.rs b/src/lib-rust/src/logging.rs index ddebcf41..f18eb93a 100644 --- a/src/lib-rust/src/logging.rs +++ b/src/lib-rust/src/logging.rs @@ -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(); }