Skip to content

Commit

Permalink
opml::import(): Break out of loop when detecting an error
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisschagt committed Oct 27, 2020
1 parent 0df41e2 commit a57f1be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/opml.cpp
Expand Up @@ -195,8 +195,11 @@ nonstd::optional<std::string> opml::import(
if (strcmp((const char*)node->name, "body") == 0) {
LOG(Level::DEBUG, "opml::import: found body");
rec_find_rss_outlines(urlcfg, node->children, "");
error_message =
urlcfg.write_config(); // Only an error if optional string has a value

error_message = urlcfg.write_config();
if (error_message.has_value()) {
break;
}
}
}

Expand Down

0 comments on commit a57f1be

Please sign in to comment.