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,10 +184,12 @@ bool Glob::RecurseDirectory(std::string::size_type start, ...@@ -184,10 +184,12 @@ bool Glob::RecurseDirectory(std::string::size_type start,
kwsys::Directory d; kwsys::Directory d;
std::string errorMessage; std::string errorMessage;
if (!d.Load(dir, &errorMessage)) { if (!d.Load(dir, &errorMessage)) {
if (!errorMessage.empty()) { if (messages) {
messages->push_back(Message(Glob::warning, if (!errorMessage.empty()) {
"Error listing directory '" + dir + messages->push_back(Message(Glob::warning,
"'! Reason: '" + errorMessage + "'")); "Error listing directory '" + dir +
"'! Reason: '" + errorMessage + "'"));
}
} }
return true; return true;
} }
......
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