aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 21:18:16 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 21:18:16 +0100
commit82166b715c2e8b39eb20d179c95aa982335ad07c (patch)
tree2a66426ae0db1fede2649d61f465ba20f1830812 /src/database.c
parent6acba7350938c099afab7bec04c8dc9adf674424 (diff)
downloadmpd-82166b715c2e8b39eb20d179c95aa982335ad07c.tar.gz
mpd-82166b715c2e8b39eb20d179c95aa982335ad07c.tar.xz
mpd-82166b715c2e8b39eb20d179c95aa982335ad07c.zip
database: db_init() initializes library, does not update
For updating the database, directory_update_init() should be called explicitly.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/database.c b/src/database.c
index b465a3472..7c5e829ac 100644
--- a/src/database.c
+++ b/src/database.c
@@ -22,10 +22,8 @@
#include "directory_save.h"
#include "song.h"
#include "conf.h"
-#include "ls.h"
#include "path.h"
#include "stats.h"
-#include "update.h"
#include "config.h"
#include <glib.h>
@@ -48,13 +46,7 @@ static time_t directory_dbModTime;
void
db_init(void)
{
- unsigned ret;
-
music_root = directory_new("", NULL);
-
- ret = directory_update_init(NULL);
- if (ret == 0)
- g_error("directory update failed");
}
void
@@ -256,6 +248,8 @@ db_load(void)
int foundFsCharset = 0;
int foundVersion = 0;
+ assert(music_root != NULL);
+
if (!music_root)
music_root = directory_new("", NULL);
while (!(fp = fopen(dbFile, "r")) && errno == EINTR) ;