From 99bc47ccdcad429d7ea2a461580079142f8b71b8 Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Thu, 17 Sep 2026 16:19:08 +0100 Subject: [PATCH] fix: command history break duplicating instance --- packages/app-lib/src/api/pack/import/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/app-lib/src/api/pack/import/mod.rs b/packages/app-lib/src/api/pack/import/mod.rs index 72f315d9ea..52707bc5d5 100644 --- a/packages/app-lib/src/api/pack/import/mod.rs +++ b/packages/app-lib/src/api/pack/import/mod.rs @@ -554,7 +554,11 @@ pub(crate) async fn copy_dotminecraft_with_reporter( "Import cannot overwrite a symbolic link", )); } - fetch::copy(&source, &target, io_semaphore).await?; + let same_file = tokio::fs::try_exists(&target).await? + && same_file::is_same_file(&source, &target)?; + if !same_file { + fetch::copy(&source, &target, io_semaphore).await?; + } } reporter .update(