From e32d04ea972ba58995cb5b20ab407753548a0620 Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Mon, 4 Aug 2025 20:30:49 -0400 Subject: [PATCH] Use ephemeral PlatformIO for clone method to support memory io --- core/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/lib.rs b/core/lib.rs index bd0eb257c..405ab96df 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -1739,8 +1739,10 @@ impl Connection { } /// Copy the current Database and write out to a new file + #[cfg(feature = "fs")] pub fn copy_db(&self, file: &str) -> Result<()> { - let io = self._db.io.clone(); + // use a new PlatformIO instance here to allow for copying in-memory databases + let io: Arc = Arc::new(PlatformIO::new()?); let disabled = false; // checkpoint so everything is in the DB file before copying self.pager