From a3071b4f266e1c3a9ce718d294d2f6f2cbb32993 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Tue, 11 Mar 2025 18:13:03 -0500 Subject: [PATCH] Fixed issues with building CLI on windows --- confetti-cli/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confetti-cli/src/main.rs b/confetti-cli/src/main.rs index 9fab98c..a61cd3f 100644 --- a/confetti-cli/src/main.rs +++ b/confetti-cli/src/main.rs @@ -1,4 +1,4 @@ -use std::{error::Error, fs, io::{self, Read, Write}, os::unix::fs::MetadataExt, path::{Path, PathBuf}}; +use std::{error::Error, fs, io::{self, Read, Write}, path::{Path, PathBuf}}; use chrono::{DateTime, Datelike, Local, Month, TimeDelta, Timelike, Utc}; @@ -371,7 +371,7 @@ async fn upload_file>( login: &Option, ) -> Result { let mut file = File::open(path).await.unwrap(); - let size = file.metadata().await.unwrap().size() as u64; + let size = file.metadata().await.unwrap().len() as u64; let ChunkedResponse {status, message, uuid, chunk_size} = { client.post(format!("{url}/upload/chunked/"))