Skip to content

Commit

Permalink
Don't abort when notmuch-config has bad data
Browse files Browse the repository at this point in the history
Refs #727
  • Loading branch information
ibuclaw authored and jorsn committed Jun 18, 2024
1 parent 3f0bcd0 commit 4b483ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ namespace Astroid {
maildir_synchronize_flags = config.get<bool> ("maildir.synchronize_flags");
} catch (const boost::property_tree::ptree_bad_path &ex) {
throw database_error ("db: error: no maildir.maildir_synchronize_flags defined in notmuch-config");
} catch (const boost::property_tree::ptree_bad_data &ex) {
ustring bad_data_s = config.get<string> ("maildir.synchronize_flags");
if (bad_data_s != "") {
LOG (error) << "db: error: bad argument '" << bad_data_s << "' "
<< "for maildir.maildir_synchronize_flags in notmuch-config "
<< "(expected yes/no)";
}
}
}

Expand Down

0 comments on commit 4b483ff

Please sign in to comment.