check path is not empty (#2203)
* check path is not empty * fix formatting * use isEmpty() to check path
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user