From 79b2cf4fd78b87ca6cc69982d782060b22bd3149 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 29 Oct 2017 22:07:58 +0100 Subject: [PATCH] [db] Log path to db on error, so it's easier to debug --- src/cache.c | 2 +- src/db.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cache.c b/src/cache.c index 89a19c56..a60819f5 100644 --- a/src/cache.c +++ b/src/cache.c @@ -454,7 +454,7 @@ cache_create(void) ret = sqlite3_open(g_db_path, &g_db_hdl); if (ret != SQLITE_OK) { - DPRINTF(E_LOG, L_CACHE, "Could not open cache database: %s\n", sqlite3_errmsg(g_db_hdl)); + DPRINTF(E_LOG, L_CACHE, "Could not open '%s': %s\n", g_db_path, sqlite3_errmsg(g_db_hdl)); sqlite3_close(g_db_hdl); return -1; diff --git a/src/db.c b/src/db.c index 0c843576..dbb91e17 100644 --- a/src/db.c +++ b/src/db.c @@ -5999,7 +5999,7 @@ db_perthread_init(void) ret = sqlite3_open(db_path, &hdl); if (ret != SQLITE_OK) { - DPRINTF(E_LOG, L_DB, "Could not open database: %s\n", sqlite3_errmsg(hdl)); + DPRINTF(E_LOG, L_DB, "Could not open '%s': %s\n", db_path, sqlite3_errmsg(hdl)); sqlite3_close(hdl); return -1;