diff options
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstallfile.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallfile.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp index 2e7061036d..7649f50e2a 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp | |||
@@ -45,16 +45,16 @@ void BootloaderInstallFile::installStage2(void) | |||
45 | QCoreApplication::processEvents(); | 45 | QCoreApplication::processEvents(); |
46 | 46 | ||
47 | // if an old bootloader is present (Gigabeat) move it out of the way. | 47 | // if an old bootloader is present (Gigabeat) move it out of the way. |
48 | QString fwfile(resolvePathCase(m_blfile)); | 48 | QString fwfile(Utils::resolvePathCase(m_blfile)); |
49 | if(!fwfile.isEmpty()) { | 49 | if(!fwfile.isEmpty()) { |
50 | QString moved = resolvePathCase(m_blfile) + ".ORIG"; | 50 | QString moved = Utils::resolvePathCase(m_blfile) + ".ORIG"; |
51 | qDebug() << "[BootloaderInstallFile] renaming" << fwfile << "to" << moved; | 51 | qDebug() << "[BootloaderInstallFile] renaming" << fwfile << "to" << moved; |
52 | QFile::rename(fwfile, moved); | 52 | QFile::rename(fwfile, moved); |
53 | } | 53 | } |
54 | 54 | ||
55 | // if no old file found resolve path without basename | 55 | // if no old file found resolve path without basename |
56 | QFileInfo fi(m_blfile); | 56 | QFileInfo fi(m_blfile); |
57 | QString absPath = resolvePathCase(fi.absolutePath()); | 57 | QString absPath = Utils::resolvePathCase(fi.absolutePath()); |
58 | 58 | ||
59 | // if it's not possible to locate the base path try to create it | 59 | // if it's not possible to locate the base path try to create it |
60 | if(absPath.isEmpty()) { | 60 | if(absPath.isEmpty()) { |
@@ -67,10 +67,10 @@ void BootloaderInstallFile::installStage2(void) | |||
67 | QString basePath = pathElements.join("/"); | 67 | QString basePath = pathElements.join("/"); |
68 | 68 | ||
69 | // check for base and bail out if not found. Otherwise create folder. | 69 | // check for base and bail out if not found. Otherwise create folder. |
70 | absPath = resolvePathCase(basePath); | 70 | absPath = Utils::resolvePathCase(basePath); |
71 | QDir d(absPath); | 71 | QDir d(absPath); |
72 | d.mkpath(lastElement); | 72 | d.mkpath(lastElement); |
73 | absPath = resolvePathCase(fi.absolutePath()); | 73 | absPath = Utils::resolvePathCase(fi.absolutePath()); |
74 | 74 | ||
75 | if(absPath.isEmpty()) { | 75 | if(absPath.isEmpty()) { |
76 | emit logItem(tr("Error accessing output folder"), LOGERROR); | 76 | emit logItem(tr("Error accessing output folder"), LOGERROR); |
@@ -98,13 +98,13 @@ bool BootloaderInstallFile::uninstall(void) | |||
98 | qDebug() << "[BootloaderInstallFile] Uninstalling bootloader"; | 98 | qDebug() << "[BootloaderInstallFile] Uninstalling bootloader"; |
99 | emit logItem(tr("Removing Rockbox bootloader"), LOGINFO); | 99 | emit logItem(tr("Removing Rockbox bootloader"), LOGINFO); |
100 | // check if a .ORIG file is present, and allow moving it back. | 100 | // check if a .ORIG file is present, and allow moving it back. |
101 | QString origbl = resolvePathCase(m_blfile + ".ORIG"); | 101 | QString origbl = Utils::resolvePathCase(m_blfile + ".ORIG"); |
102 | if(origbl.isEmpty()) { | 102 | if(origbl.isEmpty()) { |
103 | emit logItem(tr("No original firmware file found."), LOGERROR); | 103 | emit logItem(tr("No original firmware file found."), LOGERROR); |
104 | emit done(true); | 104 | emit done(true); |
105 | return false; | 105 | return false; |
106 | } | 106 | } |
107 | QString fwfile = resolvePathCase(m_blfile); | 107 | QString fwfile = Utils::resolvePathCase(m_blfile); |
108 | if(!QFile::remove(fwfile)) { | 108 | if(!QFile::remove(fwfile)) { |
109 | emit logItem(tr("Can't remove Rockbox bootloader file."), LOGERROR); | 109 | emit logItem(tr("Can't remove Rockbox bootloader file."), LOGERROR); |
110 | emit done(true); | 110 | emit done(true); |
@@ -128,10 +128,10 @@ bool BootloaderInstallFile::uninstall(void) | |||
128 | BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void) | 128 | BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void) |
129 | { | 129 | { |
130 | qDebug() << "[BootloaderInstallFile] checking installed bootloader"; | 130 | qDebug() << "[BootloaderInstallFile] checking installed bootloader"; |
131 | if(!resolvePathCase(m_blfile).isEmpty() | 131 | if(!Utils::resolvePathCase(m_blfile).isEmpty() |
132 | && !resolvePathCase(m_blfile + ".ORIG").isEmpty()) | 132 | && !Utils::resolvePathCase(m_blfile + ".ORIG").isEmpty()) |
133 | return BootloaderRockbox; | 133 | return BootloaderRockbox; |
134 | else if(!resolvePathCase(m_blfile).isEmpty()) | 134 | else if(!Utils::resolvePathCase(m_blfile).isEmpty()) |
135 | return BootloaderOther; | 135 | return BootloaderOther; |
136 | else | 136 | else |
137 | return BootloaderUnknown; | 137 | return BootloaderUnknown; |