diff options
Diffstat (limited to 'rbutil/rbutilqt/base/utils.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/utils.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp index 966ce335ea..a1b6e2bd0e 100644 --- a/rbutil/rbutilqt/base/utils.cpp +++ b/rbutil/rbutilqt/base/utils.cpp | |||
@@ -161,17 +161,14 @@ QString findExecutable(QString name) | |||
161 | 161 | ||
162 | RockboxInfo::RockboxInfo(QString mountpoint) | 162 | RockboxInfo::RockboxInfo(QString mountpoint) |
163 | { | 163 | { |
164 | m_path = mountpoint +"/.rockbox/rockbox-info.txt"; | 164 | qDebug() << "[RockboxInfo] trying to find rockbox-info at" << mountpoint; |
165 | } | 165 | QFile file(mountpoint + "/.rockbox/rockbox-info.txt"); |
166 | 166 | m_success = false; | |
167 | bool RockboxInfo::open() | ||
168 | { | ||
169 | QFile file(m_path); | ||
170 | if(!file.exists()) | 167 | if(!file.exists()) |
171 | return false; | 168 | return; |
172 | 169 | ||
173 | if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) | 170 | if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) |
174 | return false; | 171 | return; |
175 | 172 | ||
176 | // read file contents | 173 | // read file contents |
177 | while (!file.atEnd()) | 174 | while (!file.atEnd()) |
@@ -195,7 +192,9 @@ bool RockboxInfo::open() | |||
195 | m_targetid = line.remove("Target id:").trimmed(); | 192 | m_targetid = line.remove("Target id:").trimmed(); |
196 | } | 193 | } |
197 | } | 194 | } |
198 | 195 | ||
199 | file.close(); | 196 | file.close(); |
200 | return true; | 197 | m_success = true; |
198 | return; | ||
201 | } | 199 | } |
200 | |||