summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-04-07 17:48:51 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-04-07 17:48:51 +0000
commit7b1e827f0cf6930a61671c1c26aab8ed662b4134 (patch)
tree44627faf8f6b12bcbaf453763278748eb568628b /apps
parent8e6e25c353e95e6566a7dfabbd2ca31b0b9db09e (diff)
downloadrockbox-7b1e827f0cf6930a61671c1c26aab8ed662b4134.tar.gz
rockbox-7b1e827f0cf6930a61671c1c26aab8ed662b4134.zip
Dircache fixes: Stop scanning properly if shutdown is initiated. Require user to re-enable dircache if initialization fails. Don't create statefile unless eeprom settings have been initialized.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13060 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/main.c9
-rw-r--r--apps/tree.c3
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/main.c b/apps/main.c
index c5f2a99943..3145f3693b 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -172,7 +172,14 @@ static int init_dircache(bool preinit)
172 } 172 }
173 173
174 if (result < 0) 174 if (result < 0)
175 gui_syncsplash(0, "Failed! Result: %d", result); 175 {
176 /* Initialization of dircache failed. Manual action is
177 * necessary to enable dircache again.
178 */
179 gui_syncsplash(0, "Dircache failed, disabled. Result: %d", result);
180 global_settings.dircache = false;
181 }
182
176 } 183 }
177 184
178 if (clear) 185 if (clear)
diff --git a/apps/tree.c b/apps/tree.c
index c3c5ce3239..5f5cb1137a 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -1348,7 +1348,8 @@ void tree_flush(void)
1348 { 1348 {
1349 global_status.dircache_size = dircache_get_cache_size(); 1349 global_status.dircache_size = dircache_get_cache_size();
1350# ifdef HAVE_EEPROM_SETTINGS 1350# ifdef HAVE_EEPROM_SETTINGS
1351 dircache_save(); 1351 if (firmware_settings.initialized)
1352 dircache_save();
1352# endif 1353# endif
1353 dircache_disable(); 1354 dircache_disable();
1354 } 1355 }