directory: directory_load() returns GError

Do error reporting with GLib's GError library in this library, too.
This commit is contained in:
Max Kellermann
2009-03-02 15:42:42 +01:00
parent c0ffec2fd1
commit a1561252d0
3 changed files with 53 additions and 19 deletions

View File

@@ -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)