DataFile: Skip empty resource attributes

This commit is contained in:
Shmuel Hazan
2021-10-23 20:43:17 +03:00
parent 333f43c883
commit cf9cea88c3

View File

@@ -444,7 +444,17 @@ bool DataFile::copyResources(const QString& resourcesDir)
{
// Get absolute path to resource
bool error;
QString resPath = PathUtil::toAbsolute(el.attribute(*res), &error);
auto attribute = el.attribute(*res);
// Skip empty resources. In some cases, there might be an
// alternative way of actually representing the data (e.g. data element for SampleTCO)
if (attribute.isEmpty())
{
++res;
continue;
}
QString resPath = PathUtil::toAbsolute(attribute, &error);
// If we are running without the project loaded (from CLI), "local:" base
// prefixes aren't converted, so we need to convert it ourselves
if (error)