Skip to content
Snippets Groups Projects
Commit 4e549d12 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Adrien Béraud
Browse files

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

Gitlab: #1378
Change-Id: I0249a87fba240eb65165fc79bdbc0ffb55f00af8
parent 77193b26
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment