diff options
Diffstat (limited to 'utils/rbutilqt/base/bootloaderinstallbase.cpp')
-rw-r--r-- | utils/rbutilqt/base/bootloaderinstallbase.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/utils/rbutilqt/base/bootloaderinstallbase.cpp b/utils/rbutilqt/base/bootloaderinstallbase.cpp index 36a15c9e1a..b49a9b933b 100644 --- a/utils/rbutilqt/base/bootloaderinstallbase.cpp +++ b/utils/rbutilqt/base/bootloaderinstallbase.cpp | |||
@@ -203,21 +203,28 @@ void BootloaderInstallBase::checkRemount() | |||
203 | 203 | ||
204 | //! @brief set list of possible bootloader files and pick the existing one. | 204 | //! @brief set list of possible bootloader files and pick the existing one. |
205 | //! @param sl list of possible bootloader files. | 205 | //! @param sl list of possible bootloader files. |
206 | void BootloaderInstallBase::setBlFile(QStringList sl) | 206 | void BootloaderInstallBase::setBlFile(const QString& mountpoint, const QStringList& sl) |
207 | { | 207 | { |
208 | // figue which of the possible bootloader filenames is correct. | 208 | if(sl.size() == 0) { |
209 | for(int a = 0; a < sl.size(); a++) { | 209 | m_blfile = mountpoint; |
210 | if(!Utils::resolvePathCase(sl.at(a)).isEmpty()) { | ||
211 | m_blfile = sl.at(a); | ||
212 | } | ||
213 | } | 210 | } |
214 | if(m_blfile.isEmpty() && sl.size() > 0) { | 211 | else { |
215 | m_blfile = sl.at(0); | 212 | for(int a = 0; a < sl.size(); a++) { |
213 | QString filename = mountpoint + sl.at(a); | ||
214 | if(!Utils::resolvePathCase(filename).isEmpty()) { | ||
215 | m_blfile = filename; | ||
216 | break; | ||
217 | } | ||
218 | } | ||
219 | // figue which of the possible bootloader filenames is correct. | ||
220 | if(m_blfile.isEmpty() && sl.size() > 0) { | ||
221 | m_blfile = mountpoint + sl.at(0); | ||
222 | } | ||
216 | } | 223 | } |
217 | } | 224 | } |
218 | 225 | ||
219 | 226 | ||
220 | bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile) | 227 | bool BootloaderInstallBase::setOfFile(QString& of, const QStringList& blfile) |
221 | { | 228 | { |
222 | bool found = false; | 229 | bool found = false; |
223 | ArchiveUtil *util = nullptr; | 230 | ArchiveUtil *util = nullptr; |