From 1915a6fe3721108cab4a8c9bc742d089ba023b23 Mon Sep 17 00:00:00 2001 From: houseme Date: Wed, 19 Aug 2026 01:33:43 +0800 Subject: [PATCH] fix(ecstore): tidy dst dir fsync group open Co-Authored-By: heihutu --- crates/ecstore/src/disk/os.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/ecstore/src/disk/os.rs b/crates/ecstore/src/disk/os.rs index 71ce809cd..bc0ed5def 100644 --- a/crates/ecstore/src/disk/os.rs +++ b/crates/ecstore/src/disk/os.rs @@ -435,11 +435,10 @@ impl OpenedDstDirFsyncGroup { } #[cfg(not(unix))] { - let key = DstDirFsyncGroupKey::from_metadata(canonical_path.clone(), std::fs::metadata(&canonical_path)?)?; - Ok(Self { - key, - dir: canonical_path, - }) + let metadata = std::fs::metadata(&canonical_path)?; + let key = DstDirFsyncGroupKey::from_metadata(canonical_path, metadata)?; + let dir = key.canonical_path.clone(); + Ok(Self { key, dir }) } } }