diff options
| author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-12-18 21:16:47 +0000 |
|---|---|---|
| committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-12-18 21:16:47 +0000 |
| commit | cd5f753f5efb31a9e98b74e5e04c5691cc7e1608 (patch) | |
| tree | 67c9ffb6d859a947607d0625dcd1fd6886e2b199 | |
| parent | a59ec17edb13d44d8318abf12ade1402b17d5fd2 (diff) | |
| download | rockbox-cd5f753f5efb31a9e98b74e5e04c5691cc7e1608.zip rockbox-cd5f753f5efb31a9e98b74e5e04c5691cc7e1608.tar.gz rockbox-cd5f753f5efb31a9e98b74e5e04c5691cc7e1608.tar.bz2 rockbox-cd5f753f5efb31a9e98b74e5e04c5691cc7e1608.tar.xz | |
Fix issues with mi4 bootloader install:
- return correct success result. Fixes automatic install hanging.
- when reinstalling the bootloader (OF.mi4 present) remove Rockbox bootloader first. Fixes sinstall failing silently.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19474 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallmi4.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp index fa0ebb2..f7b8b9b 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp @@ -47,8 +47,14 @@ void BootloaderInstallMi4::installStage2(void) QFile oldbl(fwfile); QString moved = QFileInfo(resolvePathCase(m_blfile)).absolutePath() + "/OF.mi4"; - qDebug() << "renaming" << fwfile << "->" << moved; - oldbl.rename(moved); + if(!QFileInfo(moved).exists()) { + qDebug() << "renaming" << fwfile << "->" << moved; + oldbl.rename(moved); + } + else { + qDebug() << "OF.mi4 already present, not renaming again."; + oldbl.remove(); + } // place new bootloader m_tempfile.open(); @@ -59,7 +65,7 @@ void BootloaderInstallMi4::installStage2(void) emit logItem(tr("Bootloader successful installed"), LOGOK); logInstall(LogAdd); - emit done(true); + emit done(false); } |