summary refs log tree commit diff
path: root/src/Cache.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-08-26 14:31:23 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-08-26 14:31:23 +0300
commit177dd6a5b040212beebd0129880241cb13b6ef08 (patch)
tree5e51e9b820416193daf53bdc04c0d69cec1f63dd /src/Cache.cc
parentUpdate the cache state at once to avoid being in an invalid state (diff)
downloadnheko-177dd6a5b040212beebd0129880241cb13b6ef08.tar.xz
Remove cache data when the user logs out
Diffstat (limited to 'src/Cache.cc')
-rw-r--r--src/Cache.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Cache.cc b/src/Cache.cc
index 01df492c..6733428e 100644
--- a/src/Cache.cc
+++ b/src/Cache.cc
@@ -83,7 +83,10 @@ Cache::Cache(const QString &userId)
 
         txn.commit();
 
-        isMounted_ = true;
+        isMounted_      = true;
+        cacheDirectory_ = QString("%1/%2")
+                            .arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
+                            .arg(QString::fromUtf8(userId_.toUtf8().toHex()));
 }
 
 void