From 4b483ffc9e7aca8a0332018701aadeb9ea8c5337 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Thu, 6 Jun 2024 15:47:00 +0200 Subject: [PATCH] Don't abort when notmuch-config has bad data Refs #727 --- src/db.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/db.cc b/src/db.cc index a6038e64..efba7f97 100644 --- a/src/db.cc +++ b/src/db.cc @@ -81,6 +81,13 @@ namespace Astroid { maildir_synchronize_flags = config.get ("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 ("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)"; + } } }