From 6f2410d48dfd8bd4a9e3869b25a66654f595f9a5 Mon Sep 17 00:00:00 2001 From: c3t4r4 Date: Tue, 28 Jan 2025 17:07:04 -0300 Subject: [PATCH] fix http response and res.size null value --- rustfoil-lib/src/gdrive/gdrive_api.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rustfoil-lib/src/gdrive/gdrive_api.rs b/rustfoil-lib/src/gdrive/gdrive_api.rs index 18a5ad4..f404564 100644 --- a/rustfoil-lib/src/gdrive/gdrive_api.rs +++ b/rustfoil-lib/src/gdrive/gdrive_api.rs @@ -36,7 +36,7 @@ impl GoogleDriveApiService { let hub = DriveHub::new( hyper::Client::builder().build( hyper_rustls::HttpsConnectorBuilder::new() - .with_native_roots() + .with_native_roots()? .https_or_http() .enable_http1() .build(), @@ -365,12 +365,12 @@ impl GoogleDriveApiService { .1 } }; - + let is_shared = self.is_file_shared(&res).await?; Ok(GoogleDriveFileInfo::new( res.id.unwrap(), - res.size.unwrap(), + res.size.unwrap_or(0), res.name.unwrap(), is_shared, ))