Commit 897d2cb1 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'Directory-error-handling'

e093a985

 Glob: Append warning message only if destination is non-null
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !188
parents 8ff18ed7 e093a985
......@@ -184,11 +184,13 @@ bool Glob::RecurseDirectory(std::string::size_type start,
kwsys::Directory d;
std::string errorMessage;
if (!d.Load(dir, &errorMessage)) {
if (messages) {
if (!errorMessage.empty()) {
messages->push_back(Message(Glob::warning,
"Error listing directory '" + dir +
"'! Reason: '" + errorMessage + "'"));
}
}
return true;
}
unsigned long cc;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment