From: luangucun Date: Thu, 15 Oct 2026 10:29:24 +0000 (+0800) Subject: docs(file_store): correct Store creation and recovery guidance X-Git-Url: http://internal-gitweb-vhost/-script/src/example_cli/database/struct.AddrsOutput.html?a=commitdiff_plain;h=aa60b2dad847e8ff2f0cccf30a3e59c175194c4b;p=bdk docs(file_store): correct Store creation and recovery guidance Signed-off-by: luangucun --- diff --git a/crates/file_store/src/store.rs b/crates/file_store/src/store.rs index 858b9d2c..72d0a680 100644 --- a/crates/file_store/src/store.rs +++ b/crates/file_store/src/store.rs @@ -24,7 +24,7 @@ impl Store where C: Merge + serde::Serialize + serde::de::DeserializeOwned, { - /// Create a new [`Store`] file in write-only mode; error if the file exists. + /// Create a new [`Store`] file in read-write mode; error if the file exists. /// /// `magic` is the prefixed bytes to write to the new file. This will be checked when loading /// the [`Store`] in the future with [`load`]. @@ -66,9 +66,9 @@ where /// To get a new working file store from this error use [`Store::create`] and [`Store::append`] /// to add the aggregated changeset obtained from [`StoreErrorWithDump`]. /// - /// To analyze the causes of the problem in the original database do not recreate the [`Store`] - /// using the same file path. Not changing the file path will overwrite previous file without - /// being able to recover its original data. + /// [`Store::create`] fails if the path already exists, so create the recovered [`Store`] at a + /// different path. This keeps the original file for analysis; to replace it, rename the new + /// file over it afterwards, as shown in the example below. /// /// # Examples /// ```