diff options
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c index d57fb114d..2df1a5bf6 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 @@ -19,6 +19,7 @@ #include "config.h" #include "update_internal.h" +#include "update_remove.h" #include "update.h" #include "database.h" #include "mapper.h" @@ -68,8 +69,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); |