From 8c018a76f5631a8c488ec023aebb5377764490db Mon Sep 17 00:00:00 2001 From: Albert S Date: Wed, 10 Apr 2019 19:00:28 +0200 Subject: [PATCH] CommandAdd: if nothingprocessor is used, empty pageData is not an error --- cli/commandadd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/commandadd.cpp b/cli/commandadd.cpp index 8290d21..b2f2079 100644 --- a/cli/commandadd.cpp +++ b/cli/commandadd.cpp @@ -56,7 +56,8 @@ AddFileResult CommandAdd::addFile(QString path) 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; }