summaryrefslogtreecommitdiffstats
path: root/utils/rbutilqt/base/bootloaderinstallbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rbutilqt/base/bootloaderinstallbase.cpp')
-rw-r--r--utils/rbutilqt/base/bootloaderinstallbase.cpp25
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()
//! @brief set list of possible bootloader files and pick the existing one.
//! @param sl list of possible bootloader files.
-void BootloaderInstallBase::setBlFile(QStringList sl)
+void BootloaderInstallBase::setBlFile(const QString& mountpoint, const QStringList& sl)
{
- // figue which of the possible bootloader filenames is correct.
- for(int a = 0; a < sl.size(); a++) {
- if(!Utils::resolvePathCase(sl.at(a)).isEmpty()) {
- m_blfile = sl.at(a);
- }
+ if(sl.size() == 0) {
+ m_blfile = mountpoint;
}
- if(m_blfile.isEmpty() && sl.size() > 0) {
- m_blfile = sl.at(0);
+ else {
+ for(int a = 0; a < sl.size(); a++) {
+ QString filename = mountpoint + sl.at(a);
+ if(!Utils::resolvePathCase(filename).isEmpty()) {
+ m_blfile = filename;
+ break;
+ }
+ }
+ // figue which of the possible bootloader filenames is correct.
+ if(m_blfile.isEmpty() && sl.size() > 0) {
+ m_blfile = mountpoint + sl.at(0);
+ }
}
}
-bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile)
+bool BootloaderInstallBase::setOfFile(QString& of, const QStringList& blfile)
{
bool found = false;
ArchiveUtil *util = nullptr;