make paths cachedirectory formatting nicer

This commit is contained in:
Rasmus Karlsson 2019-05-10 23:28:05 +02:00
parent 834b1f3c53
commit fa6c9f2fba

View file

@ -37,7 +37,7 @@ bool Paths::isPortable()
QString Paths::cacheDirectory()
{
static const auto path = [] {
static const auto pathSetting = [] {
QStringSetting cachePathSetting("/cache/path");
cachePathSetting.connect([](const auto &newPath, auto) {
@ -45,7 +45,9 @@ QString Paths::cacheDirectory()
});
return cachePathSetting;
}().getValue();
}();
auto path = pathSetting.getValue();
if (path.isEmpty())
{