From d84c0e03d980fa0b5ff5136c5a5e9993f96b4e8f Mon Sep 17 00:00:00 2001 From: weisd Date: Thu, 26 Dec 2024 16:32:27 +0800 Subject: [PATCH] fix: #174 --- rustfs/src/storage/ecfs.rs | 5 +++++ scripts/run.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rustfs/src/storage/ecfs.rs b/rustfs/src/storage/ecfs.rs index b3a40ac8..917176d4 100644 --- a/rustfs/src/storage/ecfs.rs +++ b/rustfs/src/storage/ecfs.rs @@ -407,10 +407,15 @@ impl S3 for FS { }; let last_modified = info.mod_time.map(Timestamp::from); + let metadata = Some(info.user_defined); + let output = HeadObjectOutput { content_length: Some(try_!(i64::try_from(info.size))), content_type, last_modified, + e_tag: info.etag, + metadata, + version_id: info.version_id.map(|v| v.to_string()), // metadata: object_metadata, ..Default::default() }; diff --git a/scripts/run.sh b/scripts/run.sh index 5b1326e6..4f1942d1 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -18,8 +18,8 @@ fi export RUSTFS_STORAGE_CLASS_INLINE_BLOCK="512 KB" -DATA_DIR_ARG="./target/volume/test{0...4}" -# DATA_DIR_ARG="./target/volume/test" +# DATA_DIR_ARG="./target/volume/test{0...4}" +DATA_DIR_ARG="./target/volume/test" if [ -n "$1" ]; then DATA_DIR_ARG="$1"