Only call on interactive uses

Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
Yihe Li 2025-03-27 06:53:57 +08:00
parent ea44c2465c
commit 8fea37b8b7
No known key found for this signature in database
4 changed files with 22 additions and 7 deletions

View file

@ -93,8 +93,7 @@ bool askToUpdateInstanceDirName(InstancePtr instance, QWidget* parent)
return false;
// Now we can confirm that a renaming is happening
auto ret = QFile::rename(oldRoot, newRoot);
if (!ret) {
if (!instance->syncInstanceDirName()) {
QMessageBox::warning(parent, QObject::tr("Cannot rename instance"),
QObject::tr("An error occurred when performing the following renaming operation: <br/>"
" - Old instance root: %1<br/>"