mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2026-01-03 18:43:17 +08: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:
committed by
Adrien Béraud
parent
77193b26d9
commit
4e549d123e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user