aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-02 15:42:42 +0100
committerMax Kellermann <max@duempel.org>2009-03-02 15:42:42 +0100
commita1561252d0621fbd74dd6eb9be0de28a5b512c1f (patch)
tree809fd78999e0721a1dbcef1cb7a890a71da0f0e5 /src/database.c
parentc0ffec2fd1add50dae44c9e73a3c47d7d3998d15 (diff)
downloadmpd-a1561252d0621fbd74dd6eb9be0de28a5b512c1f.tar.gz
mpd-a1561252d0621fbd74dd6eb9be0de28a5b512c1f.tar.xz
mpd-a1561252d0621fbd74dd6eb9be0de28a5b512c1f.zip
directory: directory_load() returns GError
Do error reporting with GLib's GError library in this library, too.
Diffstat (limited to '')
-rw-r--r--src/database.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 814811454..e25461c33 100644
--- a/src/database.c
+++ b/src/database.c
@@ -282,6 +282,7 @@ db_load(GError **error)
struct stat st;
char buffer[100];
bool found_charset = false, found_version = false;
+ bool success;
assert(database_path != NULL);
assert(music_root != NULL);
@@ -357,9 +358,12 @@ db_load(GError **error)
g_debug("reading DB");
- directory_load(fp, music_root);
+ success = directory_load(fp, music_root, error);
while (fclose(fp) && errno == EINTR) ;
+ if (!success)
+ return false;
+
stats_update();
if (stat(database_path, &st) == 0)