From 0821d6ca80fe71fdc251580c56cbe4595f6a84f3 Mon Sep 17 00:00:00 2001 From: Adrian Szyndela Date: Thu, 9 Apr 2020 10:01:48 +0200 Subject: [PATCH] xml-parser: don't clear list of included files in each dir The 'includedir' directives should make the parser include all the files in the directories introduced with the directives. This commit removes clearing of the gathered file list when the directive is encountered. Change-Id: Id14be322e8696bd85ddfbb0ba2360a7b4b5bcda4 --- src/internal/xml_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/xml_parser.cpp b/src/internal/xml_parser.cpp index dba29ff..4bcbb1d 100644 --- a/src/internal/xml_parser.cpp +++ b/src/internal/xml_parser.cpp @@ -284,7 +284,7 @@ void XmlParser::getIncludedFiles(const std::string& parent_dir, const std::strin DIR *dir; struct dirent *ent; const std::string dname = expandPath(parent_dir, incldir); - files.clear(); + if ((dir = opendir(dname.c_str())) != NULL) { while ((ent = readdir(dir)) != NULL) { std::string s(ent->d_name); -- 2.7.4