Skip to content

Commit

Permalink
check path is not empty (#2203)
Browse files Browse the repository at this point in the history
* check path is not empty

* fix formatting

* use isEmpty() to check path
  • Loading branch information
swills authored Nov 17, 2020
1 parent 60d5c5d commit 529f19a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/singletons/Paths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ QString Paths::cacheDirectory()
QStringSetting cachePathSetting("/cache/path");

cachePathSetting.connect([](const auto &newPath, auto) {
QDir().mkpath(newPath);
if (!newPath.isEmpty())
{
QDir().mkpath(newPath);
}
});

return cachePathSetting;
Expand Down

0 comments on commit 529f19a

Please sign in to comment.