diff options
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c index 7543ceb3f7..fde4da0e04 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include "tagcache.h" | 64 | #include "tagcache.h" |
65 | #include "yesno.h" | 65 | #include "yesno.h" |
66 | #include "gwps-common.h" | 66 | #include "gwps-common.h" |
67 | #include "eeprom_settings.h" | ||
67 | 68 | ||
68 | /* gui api */ | 69 | /* gui api */ |
69 | #include "list.h" | 70 | #include "list.h" |
@@ -1367,8 +1368,13 @@ void tree_flush(void) | |||
1367 | #ifdef HAVE_DIRCACHE | 1368 | #ifdef HAVE_DIRCACHE |
1368 | if (global_settings.dircache) | 1369 | if (global_settings.dircache) |
1369 | { | 1370 | { |
1370 | if (dircache_is_enabled()) | 1371 | # ifdef HAVE_EEPROM |
1372 | if (dircache_is_enabled() && firmware_settings.initialized) | ||
1373 | { | ||
1371 | global_settings.dircache_size = dircache_get_cache_size(); | 1374 | global_settings.dircache_size = dircache_get_cache_size(); |
1375 | dircache_save(DIRCACHE_FILE); | ||
1376 | } | ||
1377 | # endif | ||
1372 | dircache_disable(); | 1378 | dircache_disable(); |
1373 | } | 1379 | } |
1374 | else | 1380 | else |
@@ -1382,6 +1388,7 @@ void tree_flush(void) | |||
1382 | void tree_restore(void) | 1388 | void tree_restore(void) |
1383 | { | 1389 | { |
1384 | #ifdef HAVE_DIRCACHE | 1390 | #ifdef HAVE_DIRCACHE |
1391 | remove(DIRCACHE_FILE); | ||
1385 | if (global_settings.dircache) | 1392 | if (global_settings.dircache) |
1386 | { | 1393 | { |
1387 | /* Print "Scanning disk..." to the display. */ | 1394 | /* Print "Scanning disk..." to the display. */ |