From e132f2fd1bb7d7359c9f0f14ec9cceb8be339d02 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 26 Jan 2025 23:59:13 -0600 Subject: [PATCH] [studio] Make file move do nothing if the file already exists --- src/olympic/studio/applib/src/studioapp.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/olympic/studio/applib/src/studioapp.cpp b/src/olympic/studio/applib/src/studioapp.cpp index 3b45c2d1..fa50bc6d 100644 --- a/src/olympic/studio/applib/src/studioapp.cpp +++ b/src/olympic/studio/applib/src/studioapp.cpp @@ -495,11 +495,15 @@ ox::Error StudioUI::queueFileMove(ox::StringParam src, ox::StringParam dst) noex void StudioUI::procFileMoves() noexcept { for (auto const &m : m_queuedMoves) { - oxLogError(m_project->moveItem(m.a, m.b)); + if (!m_project->exists(m.b)) { + oxLogError(m_project->moveItem(m.a, m.b)); + } } m_queuedMoves.clear(); for (auto const &m : m_queuedDirMoves) { - oxLogError(m_project->moveDir(m.a, m.b)); + if (!m_project->exists(m.b)) { + oxLogError(m_project->moveDir(m.a, m.b)); + } } m_queuedDirMoves.clear(); }