aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c
index d57fb114d..1a3060653 100644
--- a/src/update.c
+++ b/src/update.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -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);