Commit e093a985 authored by Brad King's avatar Brad King
Browse files

Glob: Append warning message only if destination is non-null

Fix the change from commit f33ef4e3 (Glob: issue warnings on Directory
errors, 2020-05-12) to not append to nullptr messages.
parent 97f880e6
......@@ -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()) {
"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