check path is not empty (#2203)

* check path is not empty

* fix formatting

* use isEmpty() to check path
This commit is contained in:
Steve Wills 2020-11-17 13:59:49 -05:00 committed by GitHub
parent 60d5c5d99f
commit 529f19a2de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,10 @@ QString Paths::cacheDirectory()
QStringSetting cachePathSetting("/cache/path"); QStringSetting cachePathSetting("/cache/path");
cachePathSetting.connect([](const auto &newPath, auto) { cachePathSetting.connect([](const auto &newPath, auto) {
QDir().mkpath(newPath); if (!newPath.isEmpty())
{
QDir().mkpath(newPath);
}
}); });
return cachePathSetting; return cachePathSetting;