refs #847 Missing cache directory is not an error, just means there is nothing to load.

This commit is contained in:
Mathew Sutcliffe
2016-12-29 23:38:59 +00:00
parent 34f7acbf8d
commit ef04c05831

View File

@@ -397,6 +397,10 @@ namespace BlackMisc
CStatusMessage CValueCache::loadFromFiles(const QString &dir, const QSet<QString> &keys, const CVariantMap &currentValues, CValueCachePacket &o_values, const QString &keysMessage) const
{
if (! QDir(dir).exists())
{
return CStatusMessage(this).warning("No such directory %1") << dir;
}
if (! QDir(dir).isReadable())
{
return CStatusMessage(this).error("Failed to read from directory %1") << dir;