Skip to content

Commit

Permalink
🐛 Use the common interface to get the creation and modification time …
Browse files Browse the repository at this point in the history
…of the file.
  • Loading branch information
langyo committed Sep 29, 2024
1 parent c4282fb commit c44c2f7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/database_driver_native/src/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{
fs::File,
io::{Read, Seek, SeekFrom},
ops::RangeInclusive,
os::windows::fs::MetadataExt,
path::PathBuf,
sync::{Arc, Mutex},
};
Expand Down Expand Up @@ -97,12 +96,12 @@ impl BucketStore for ProxyBucket {

Ok(BucketItemMetadata {
key: key.clone(),
version: metadata.last_write_time().to_string(),
version: DateTime::<Utc>::from(metadata.modified()?).to_rfc3339(),
size: metadata.len() as usize,

etag: "".to_string(),
http_etag: "".to_string(),
uploaded: DateTime::from_timestamp_nanos(metadata.creation_time() as i64),
uploaded: DateTime::from(metadata.created()?),

http_metadata: Default::default(),
custom_metadata: Default::default(),
Expand Down

0 comments on commit c44c2f7

Please sign in to comment.