diff options
-rw-r--r-- | apps/tagcache.c | 4 | ||||
-rw-r--r-- | apps/tagcache.h | 1 | ||||
-rw-r--r-- | apps/tagtree.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index b3a16a3c42..50c6253522 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -4746,6 +4746,10 @@ bool tagcache_is_initialized(void) { return tc_stat.initialized; } +bool tagcache_is_fully_initialized(void) +{ + return tc_stat.readyvalid; +} bool tagcache_is_usable(void) { return tc_stat.initialized && tc_stat.ready; diff --git a/apps/tagcache.h b/apps/tagcache.h index 4fffccae2f..8c09063fb9 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h @@ -247,6 +247,7 @@ void tagcache_unload_ramcache(void); #endif void tagcache_init(void) INIT_ATTR; bool tagcache_is_initialized(void); +bool tagcache_is_fully_initialized(void); bool tagcache_is_usable(void); void tagcache_start_scan(void); void tagcache_stop_scan(void); diff --git a/apps/tagtree.c b/apps/tagtree.c index 4673af38cf..fa88a5941b 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -659,7 +659,7 @@ static void tagtree_buffer_event(void *data) logf("be:%s", id3->path); - while (! tagcache_is_usable()) + while (! tagcache_is_fully_initialized()) yield(); if (!tagcache_find_index(&tcs, id3->path)) |