diff options
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallmi4.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp index b2d8d0c24b..8bce8212a9 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp | |||
@@ -58,9 +58,22 @@ void BootloaderInstallMi4::installStage2(void) | |||
58 | 58 | ||
59 | // place new bootloader | 59 | // place new bootloader |
60 | m_tempfile.open(); | 60 | m_tempfile.open(); |
61 | qDebug() << "[BootloaderInstallMi4] renaming" << m_tempfile.fileName() << "to" << fwfile; | 61 | qDebug() << "[BootloaderInstallMi4] renaming" << m_tempfile.fileName() |
62 | << "to" << fwfile; | ||
62 | m_tempfile.close(); | 63 | m_tempfile.close(); |
63 | m_tempfile.copy(fwfile); | 64 | if(!Utils::resolvePathCase(fwfile).isEmpty()) { |
65 | emit logItem(tr("A firmware file is already present on player"), LOGERROR); | ||
66 | emit done(true); | ||
67 | return; | ||
68 | } | ||
69 | if(m_tempfile.copy(fwfile)) { | ||
70 | emit logItem(tr("Bootloader successful installed"), LOGOK); | ||
71 | } | ||
72 | else { | ||
73 | emit logItem(tr("Copying modified firmware file failed"), LOGERROR); | ||
74 | emit done(true); | ||
75 | return; | ||
76 | } | ||
64 | 77 | ||
65 | emit logItem(tr("Bootloader successful installed"), LOGOK); | 78 | emit logItem(tr("Bootloader successful installed"), LOGOK); |
66 | logInstall(LogAdd); | 79 | logInstall(LogAdd); |