summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/menus/settings_menu.c16
-rw-r--r--apps/tagcache.c2
-rw-r--r--apps/tree.c2
3 files changed, 9 insertions, 11 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index b3003bf5c2..82c91aa3c4 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -189,16 +189,14 @@ static int dircache_callback(int action,const struct menu_item_ex *this_item)
189 switch (action) 189 switch (action)
190 { 190 {
191 case ACTION_EXIT_MENUITEM: /* on exit */ 191 case ACTION_EXIT_MENUITEM: /* on exit */
192 switch (global_settings.dircache) 192 if (global_settings.dircache && !dircache_is_enabled())
193 { 193 {
194 case true: 194 if (dircache_build(0) < 0)
195 if (!dircache_is_enabled()) 195 splash(HZ*2, ID2P(LANG_PLEASE_REBOOT));
196 splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); 196 }
197 break; 197 else if (!global_settings.dircache && dircache_is_enabled())
198 case false: 198 {
199 if (dircache_is_enabled()) 199 dircache_disable();
200 dircache_disable();
201 break;
202 } 200 }
203 break; 201 break;
204 } 202 }
diff --git a/apps/tagcache.c b/apps/tagcache.c
index e3f2f4fe68..8d522b1536 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -3099,7 +3099,7 @@ static bool commit(void)
3099#ifdef HAVE_DIRCACHE 3099#ifdef HAVE_DIRCACHE
3100 /* Rebuild the dircache, if we stole the buffer. */ 3100 /* Rebuild the dircache, if we stole the buffer. */
3101 if (dircache_buffer_stolen) 3101 if (dircache_buffer_stolen)
3102 dircache_build(0); 3102 dircache_resume();
3103#endif 3103#endif
3104 3104
3105#ifdef HAVE_TC_RAMCACHE 3105#ifdef HAVE_TC_RAMCACHE
diff --git a/apps/tree.c b/apps/tree.c
index c7484ff420..24acd5ac69 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -1216,7 +1216,7 @@ void tree_flush(void)
1216 if (firmware_settings.initialized) 1216 if (firmware_settings.initialized)
1217 dircache_save(); 1217 dircache_save();
1218# endif 1218# endif
1219 dircache_disable(); 1219 dircache_suspend();
1220 } 1220 }
1221 else 1221 else
1222 { 1222 {