mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 12:57:45 +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
(cherry picked from commit 99785e5d68
)
This commit is contained in:
parent
870c997cd3
commit
86becb1407
1 changed files with 5 additions and 5 deletions
|
@ -233,16 +233,16 @@ void Patcher::processPatch(const QueuedPatch &patch)
|
|||
}
|
||||
|
||||
Utility::writeVersion(verFilePath, patch.version);
|
||||
|
||||
if (!m_launcher.settings()->keepPatches()) {
|
||||
QFile::remove(patch.path);
|
||||
}
|
||||
}
|
||||
|
||||
void Patcher::setupDirectories()
|
||||
{
|
||||
QDir dataDir;
|
||||
if (m_launcher.settings()->keepPatches()) {
|
||||
dataDir.setPath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
|
||||
} else {
|
||||
dataDir.setPath(QStandardPaths::writableLocation(QStandardPaths::TempLocation));
|
||||
}
|
||||
dataDir.setPath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
|
||||
|
||||
m_patchesDir.setPath(dataDir.absoluteFilePath(QStringLiteral("patch")));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue