aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-09 23:28:27 +0200
committerMax Kellermann <max@duempel.org>2011-09-09 23:28:27 +0200
commit68875ba600c635f985aa8deea7f940816a5e7645 (patch)
treeed0b2c4819dca0072d1642d1825492714db16e65 /src/update.c
parent2119a16e2479755dc9146e8a70b2642c7ed1db4a (diff)
downloadmpd-68875ba600c635f985aa8deea7f940816a5e7645.tar.gz
mpd-68875ba600c635f985aa8deea7f940816a5e7645.tar.xz
mpd-68875ba600c635f985aa8deea7f940816a5e7645.zip
database: return GError on failure
Diffstat (limited to '')
-rw-r--r--src/update.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/update.c b/src/update.c
index 8fe6023ae..1a3060653 100644
--- a/src/update.c
+++ b/src/update.c
@@ -68,8 +68,14 @@ static void * update_task(void *_path)
modified = update_walk(path, discard);
- if (modified || !db_exists())
- db_save();
+ if (modified || !db_exists()) {
+ GError *error = NULL;
+ if (!db_save(&error)) {
+ g_warning("Failed to save database: %s",
+ error->message);
+ g_error_free(error);
+ }
+ }
if (path != NULL && *path != 0)
g_debug("finished: %s", path);