diff --git a/crates/rattler_package_streaming/src/write.rs b/crates/rattler_package_streaming/src/write.rs index ecb516f22..3c08f1bc3 100644 --- a/crates/rattler_package_streaming/src/write.rs +++ b/crates/rattler_package_streaming/src/write.rs @@ -238,7 +238,7 @@ fn prepare_header( header.set_device_major(0)?; if let Some(timestamp) = timestamp { - header.set_mtime(timestamp.timestamp() as u64); + header.set_mtime(timestamp.timestamp().unsigned_abs()); } // let file_size = stat.len(); @@ -264,10 +264,10 @@ fn append_path_to_archive( .map_err(|err| trace_file_error(&base_path.join(path), err))?; if header.entry_type().is_file() { - let file = fs::File::open(base_path.join(path)) + let mut file = fs::File::open(base_path.join(path)) .map_err(|err| trace_file_error(&base_path.join(path), err))?; - archive.append_data(&mut header, path, file)?; + archive.append_file(path, &mut file)?; } else if header.entry_type().is_symlink() || header.entry_type().is_hard_link() { let target = fs::read_link(base_path.join(path)) .map_err(|err| trace_file_error(&base_path.join(path), err))?;