From 6c47eb3eea2ff8c58a7349a2d17a69f10b7fd863 Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 16 Apr 2021 03:59:07 +0200 Subject: [PATCH] pEpSQLite - Fix delete_db() --- src/pEpSQLite.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pEpSQLite.cc b/src/pEpSQLite.cc index 182a9d4..6e88022 100644 --- a/src/pEpSQLite.cc +++ b/src/pEpSQLite.cc @@ -40,8 +40,8 @@ namespace pEp { void pEpSQLite::delete_db() { pEpLogClass("called"); - remove(db_path.c_str()); - if (errno) { + int status = remove(db_path.c_str()); + if (status) { runtime_error e{string("could not delete db (" + db_path + "): " + strerror(errno))}; throw (e); }