mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +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:
parent
77193b26d9
commit
4e549d123e
1 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue