1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 03:53:23 +02:00

misc: use the cache dir instead of the data dir as the cache dir

Gitlab: #1378
Change-Id: I0249a87fba240eb65165fc79bdbc0ffb55f00af8
This commit is contained in:
Andreas Traczyk 2023-10-10 19:03:33 -04:00 committed by Adrien Béraud
parent 77193b26d9
commit 4e549d123e

View file

@ -154,9 +154,18 @@ UtilsAdapter::getLocalDataPath()
const QString
UtilsAdapter::getCachePath()
{
QDir dataDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
dataDir.cdUp();
return dataDir.absolutePath() + "/jami";
const auto cacheDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
// Remove old mistaken cache dir.
// NOTE: this can be removed once we give a chance for users to upgrade.
QDir oldCacheDir(cacheDir);
oldCacheDir.cdUp();
oldCacheDir.setPath(oldCacheDir.absolutePath() + "/jami");
if (oldCacheDir.exists()) {
oldCacheDir.removeRecursively();
}
return cacheDir;
}
QString