mirror of https://github.com/mgba-emu/mgba.git
Qt: Manually split filename to avoid overzealous splitting (fixes #2681)
This commit is contained in:
parent
81cb4c3bf6
commit
277aa36d12
1
CHANGES
1
CHANGES
|
@ -1,5 +1,6 @@
|
|||
0.10.1: (Future)
|
||||
Other fixes:
|
||||
- Qt: Manually split filename to avoid overzealous splitting (fixes mgba.io/i/2681)
|
||||
- Res: Fix species name location in Ruby/Sapphire revs 1/2 (fixes mgba.io/i/2685)
|
||||
|
||||
0.10.0: (2022-10-11)
|
||||
|
|
|
@ -137,7 +137,15 @@ QUrl ApplicationUpdater::parseManifest(const QByteArray& manifest) {
|
|||
QString ApplicationUpdater::destination() const {
|
||||
QFileInfo path(updateInfo().url.path());
|
||||
QDir dir(ConfigController::configDir());
|
||||
return dir.filePath(QLatin1String("update.") + path.completeSuffix());
|
||||
// QFileInfo::completeSuffix will eat all .'s in the filename...including
|
||||
// ones in the version string, turning mGBA-1.0.0-win32.7z into
|
||||
// 0.0-win32.7z instead of the intended .7z
|
||||
// As a result, so we have to split out the complete suffix manually.
|
||||
QString suffix(path.suffix());
|
||||
if (path.completeBaseName().endsWith(".tar")) {
|
||||
suffix = "tar." + suffix;
|
||||
}
|
||||
return dir.filePath(QLatin1String("update.") + suffix);
|
||||
}
|
||||
|
||||
const char* ApplicationUpdater::platform() {
|
||||
|
|
Loading…
Reference in New Issue