Ref T620, check for empty string as path, QDir("") exists

This commit is contained in:
Klaus Basan
2019-04-21 18:34:17 +02:00
parent a553dfc708
commit 5caea5ad9b
4 changed files with 25 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ namespace BlackMisc
QString CDirectories::existingOrDefaultDir(const QString &checkDir, const QString &defaultDir) const
{
if (checkDir.isEmpty()) { return defaultDir; } // empty dir returns true ????
const QDir d(checkDir);
if (d.exists()) { return checkDir; }
return defaultDir;