aboutsummaryrefslogtreecommitdiff
path: root/lib/avatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/avatar.cpp')
-rw-r--r--lib/avatar.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/avatar.cpp b/lib/avatar.cpp
index b8e1096d..c0ef3cba 100644
--- a/lib/avatar.cpp
+++ b/lib/avatar.cpp
@@ -190,18 +190,8 @@ bool Avatar::Private::checkUrl(const QUrl& url) const
return _imageSource != Banned;
}
-QString cacheLocation() {
- const auto cachePath =
- QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
- + "/avatar/";
- QDir dir;
- if (!dir.exists(cachePath))
- dir.mkpath(cachePath);
- return cachePath;
-}
-
QString Avatar::Private::localFile() const {
- static const auto cachePath = cacheLocation();
+ static const auto cachePath = cacheLocation("avatars");
return cachePath % _url.authority() % '_' % _url.fileName() % ".png";
}