diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp index d130ab50ce..3f72b7058e 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp @@ -215,6 +215,17 @@ namespace O3DE::ProjectManager return false; } + // Check if project path has changed and move it + // Move project first to avoid trying to update settings at the new location before it has been moved there + if (newProjectSettings.m_path != m_projectInfo.m_path) + { + if (!ProjectUtils::MoveProject(m_projectInfo.m_path, newProjectSettings.m_path)) + { + QMessageBox::critical(this, tr("Project move failed"), tr("Failed to move project.")); + return false; + } + } + // Update project if settings changed { auto result = PythonBindingsInterface::Get()->UpdateProject(newProjectSettings); @@ -225,16 +236,6 @@ namespace O3DE::ProjectManager } } - // Check if project path has changed and move it - if (newProjectSettings.m_path != m_projectInfo.m_path) - { - if (!ProjectUtils::MoveProject(m_projectInfo.m_path, newProjectSettings.m_path)) - { - QMessageBox::critical(this, tr("Project move failed"), tr("Failed to move project.")); - return false; - } - } - if (!newProjectSettings.m_newPreviewImagePath.isEmpty()) { if (!ProjectUtils::ReplaceFile(