plugins: Disk Tidy: wait for dircache

Running Disk Tidy while the dircache is loading is a lot
slower than waiting for it to finish building first.

Typical scenarios for this would be starting Disk Tidy
immediately after booting or after unplugging from USB.

Deleting files during a dircache build also seems to easily
result in memory corruption, as evidenced by visual glitches
appearing in the theme.

Change-Id: I9250d918d916b112ffe2504a9225a0b52bcc3622
This commit is contained in:
Christian Soffke 2025-12-20 06:06:05 +01:00
parent 8e512d1f79
commit f7ede2b9df
3 changed files with 10 additions and 0 deletions

View file

@ -871,6 +871,9 @@ static const struct plugin_api rockbox_api = {
#endif
strstr,
sb_set_title_text,
#ifdef HAVE_DIRCACHE
dircache_wait,
#endif
};
static int plugin_buffer_handle;