mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-17 17:12:39 -05:00
rbutil: improve the backup function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17463 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9c54187678
commit
d24eb9e461
9 changed files with 203 additions and 66 deletions
|
|
@ -134,3 +134,26 @@ QUrl systemProxy(void)
|
|||
return QUrl("");
|
||||
#endif
|
||||
}
|
||||
|
||||
QString installedVersion(QString mountpoint)
|
||||
{
|
||||
// read rockbox-info.txt
|
||||
QFile info(mountpoint +"/.rockbox/rockbox-info.txt");
|
||||
if(!info.open(QIODevice::ReadOnly))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
QString target, features,version;
|
||||
while (!info.atEnd()) {
|
||||
QString line = info.readLine();
|
||||
|
||||
if(line.contains("Version:"))
|
||||
{
|
||||
return line.remove("Version:").trimmed();
|
||||
}
|
||||
}
|
||||
info.close();
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue