Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load_xml_files: handle DT_UNKNOWN #61

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/config-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ std::shared_ptr<wf::config::section_t> wf::config::config_manager_t::get_section
return nullptr;
}

std::vector<std::shared_ptr<wf::config::section_t>> wf::config::config_manager_t::
get_all_sections() const
std::vector<std::shared_ptr<wf::config::section_t>> wf::config::config_manager_t::get_all_sections() const
{
std::vector<std::shared_ptr<wf::config::section_t>> list;
for (auto& section : this->priv->sections)
Expand Down
2 changes: 1 addition & 1 deletion src/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static wf::config::config_manager_t load_xml_files(
struct dirent *entry;
while ((entry = readdir(xmld)) != NULL)
{
if ((entry->d_type != DT_LNK) && (entry->d_type != DT_REG))
if ((entry->d_type != DT_LNK) && (entry->d_type != DT_REG) && (entry->d_type != DT_UNKNOWN))
{
continue;
}
Expand Down
3 changes: 1 addition & 2 deletions src/xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ std::shared_ptr<wf::config::option_base_t> parse_compound_option(xmlNodePtr node
return std::shared_ptr<wf::config::option_base_t>(opt);
}

std::shared_ptr<wf::config::option_base_t> wf::config::xml::
create_option_from_xml_node(xmlNodePtr node)
std::shared_ptr<wf::config::option_base_t> wf::config::xml::create_option_from_xml_node(xmlNodePtr node)
{
if ((node->type != XML_ELEMENT_NODE) ||
((const char*)node->name != std::string{"option"}))
Expand Down