From 33975fbbda881c11976d2d8ff6c42e0df0518c28 Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Thu, 5 Apr 2007 21:24:21 +0000 Subject: Use date and time rather than size and starting cluster to detect installation of a new version git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13038 a1c6a512-1295-4272-9138-f99709370657 --- apps/misc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/misc.c b/apps/misc.c index 4e1de7a019..f95abb862f 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -885,8 +885,8 @@ int get_replaygain_mode(bool have_track_gain, bool have_album_gain) */ void check_bootfile(bool do_rolo) { - static int boot_size = 0; - static int boot_cluster = 0; + static int wrtdate = 0; + static int wrttime = 0; DIR* dir = NULL; struct dirent* entry = NULL; @@ -901,10 +901,10 @@ void check_bootfile(bool do_rolo) if(!strcasecmp(entry->d_name, BOOTFILE)) { /* found the bootfile */ - if(boot_size && do_rolo) + if(wrtdate && do_rolo) { - if((entry->size != boot_size) || - (entry->startcluster != boot_cluster)) + if((entry->wrtdate != wrtdate) || + (entry->wrttime != wrttime)) { char *lines[] = { str(LANG_BOOT_CHANGED), str(LANG_REBOOT_NOW) }; @@ -914,8 +914,8 @@ void check_bootfile(bool do_rolo) rolo_load(BOOTDIR "/" BOOTFILE); } } - boot_size = entry->size; - boot_cluster = entry->startcluster; + wrtdate = entry->wrtdate; + wrttime = entry->wrttime; } } closedir(dir); -- cgit v1.2.3