CommandAdd: if nothingprocessor is used, empty pageData is not an error

This commit is contained in:
Albert S. 2019-04-10 19:00:28 +02:00
parent 6ba1147d11
commit 8c018a76f5

View File

@ -56,7 +56,8 @@ AddFileResult CommandAdd::addFile(QString path)
pageData = processor->process(Utils::readFile(absPath)); pageData = processor->process(Utils::readFile(absPath));
} }
if(pageData.isEmpty()) // Could happen if a file corrupted for example
if(pageData.isEmpty() && processor != nothingProcessor)
{ {
Utils::error() << "Could not get any content for " << absPath << endl; Utils::error() << "Could not get any content for " << absPath << endl;
} }