Size should be platform independent and 64 bit. (#93)

This commit is contained in:
Aditya Manthramurthy 2024-06-17 12:42:12 -07:00 committed by GitHub
parent 6e1af9166f
commit 6f2dd62691
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -99,9 +99,9 @@ fn parse_list_objects_contents(
&content.get_child_text_or_error("LastModified")?,
)?);
let etag = content.get_child_text("ETag");
let size: Option<usize> = content
let size: Option<u64> = content
.get_child_text("Size")
.map(|x| x.parse::<usize>())
.map(|x| x.parse::<u64>())
.transpose()?;
let storage_class = content.get_child_text("StorageClass");
let is_latest = content

View File

@ -155,7 +155,7 @@ pub struct ListEntry {
pub etag: Option<String>, // except DeleteMarker
pub owner_id: Option<String>,
pub owner_name: Option<String>,
pub size: Option<usize>, // except DeleteMarker
pub size: Option<u64>, // except DeleteMarker
pub storage_class: Option<String>,
pub is_latest: bool, // except ListObjects V1/V2
pub version_id: Option<String>, // except ListObjects V1/V2