From 1db8480b7550c85c6c05f79d4faee762ea240100 Mon Sep 17 00:00:00 2001 From: "Nathan.fooo" <86001920+appflowy@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:28:34 +0800 Subject: [PATCH] chore: using write lock to fix acquire lock error (#5938) --- frontend/rust-lib/flowy-folder/src/manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/rust-lib/flowy-folder/src/manager.rs b/frontend/rust-lib/flowy-folder/src/manager.rs index c5cfb2b85c..0f3ff02c1e 100644 --- a/frontend/rust-lib/flowy-folder/src/manager.rs +++ b/frontend/rust-lib/flowy-folder/src/manager.rs @@ -373,7 +373,7 @@ impl FolderManager { F1: FnOnce() -> Output, F2: FnOnce(&Folder) -> Output, { - let folder = self.mutex_folder.read(); + let folder = self.mutex_folder.write(); match &*folder { None => none_callback(), Some(folder) => f2(folder),