diff --git a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp index 0db39a5be3..2e7061036d 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp @@ -84,7 +84,7 @@ void BootloaderInstallFile::installStage2(void) m_tempfile.open(); qDebug() << "[BootloaderInstallFile] renaming" << m_tempfile.fileName() << "to" << fwfile; m_tempfile.close(); - m_tempfile.rename(fwfile); + m_tempfile.copy(fwfile); emit logItem(tr("Bootloader successful installed"), LOGOK); logInstall(LogAdd); diff --git a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp index 8ae872d5ab..936ad175c3 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp @@ -61,7 +61,7 @@ void BootloaderInstallMi4::installStage2(void) m_tempfile.open(); qDebug() << "[BootloaderInstallMi4] renaming" << m_tempfile.fileName() << "to" << fwfile; m_tempfile.close(); - m_tempfile.rename(fwfile); + m_tempfile.copy(fwfile); emit logItem(tr("Bootloader successful installed"), LOGOK); logInstall(LogAdd); @@ -96,8 +96,7 @@ bool BootloaderInstallMi4::uninstall(void) QFile blfile(resolved); blfile.remove(); - QFile oldbl(resolvePathCase(original)); - oldbl.rename(m_blfile); + QFile::rename(resolvePathCase(original), m_blfile); emit logItem(tr("Rockbox bootloader successful removed"), LOGINFO); logInstall(LogRemove); emit done(false);