summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-12-12 10:45:34 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-12-12 10:45:34 +0000
commit6581146eb110b5b19e1492a1912379ba2eb9b49d (patch)
tree3fe4d1fbe43ebf435ccf2ad45f57f248f82afeae /apps/tree.c
parent972b2dbcab9aa5cf24dcc51d8a5744306f6248a9 (diff)
Fix dircache not saving the last size (Caused the Scanning disk splash
to show every bot). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11734 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 17da91d72b..29bf75d074 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -1437,20 +1437,24 @@ void tree_flush(void)
#endif
#ifdef HAVE_DIRCACHE
- if (global_settings.dircache)
{
- global_settings.dircache_size = dircache_get_cache_size();
+ int old_val = global_settings.dircache_size;
+ if (global_settings.dircache)
+ {
+ global_settings.dircache_size = dircache_get_cache_size();
# ifdef HAVE_EEPROM_SETTINGS
- if (dircache_is_enabled() && firmware_settings.initialized)
- dircache_save(DIRCACHE_FILE);
+ if (dircache_is_enabled() && firmware_settings.initialized)
+ dircache_save(DIRCACHE_FILE);
# endif
- dircache_disable();
- }
- else
- {
- global_settings.dircache_size = 0;
+ dircache_disable();
+ }
+ else
+ {
+ global_settings.dircache_size = 0;
+ }
+ if (old_val != global_settings.dircache_size)
+ settings_save();
}
- settings_save();
#endif
}