mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 11:47:46 +00:00
Don't store patches in temp directories anymore
This was causing memory issues on systems (like Linux/Flatpak) where the temp directory existed on tmpfs (aka RAM). Now they're stored in app data and deleted when we're finished with them. Fixes #17
This commit is contained in:
parent
99b7255c66
commit
99785e5d68
1 changed files with 5 additions and 5 deletions
|
@ -233,16 +233,16 @@ void Patcher::processPatch(const QueuedPatch &patch)
|
||||||
}
|
}
|
||||||
|
|
||||||
Utility::writeVersion(verFilePath, patch.version);
|
Utility::writeVersion(verFilePath, patch.version);
|
||||||
|
|
||||||
|
if (!m_launcher.settings()->keepPatches()) {
|
||||||
|
QFile::remove(patch.path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Patcher::setupDirectories()
|
void Patcher::setupDirectories()
|
||||||
{
|
{
|
||||||
QDir dataDir;
|
QDir dataDir;
|
||||||
if (m_launcher.settings()->keepPatches()) {
|
dataDir.setPath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
|
||||||
dataDir.setPath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
|
|
||||||
} else {
|
|
||||||
dataDir.setPath(QStandardPaths::writableLocation(QStandardPaths::TempLocation));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_patchesDir.setPath(dataDir.absoluteFilePath(QStringLiteral("patch")));
|
m_patchesDir.setPath(dataDir.absoluteFilePath(QStringLiteral("patch")));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue