diff options
| author | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-04-05 21:24:21 +0000 |
|---|---|---|
| committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-04-05 21:24:21 +0000 |
| commit | 33975fbbda881c11976d2d8ff6c42e0df0518c28 (patch) | |
| tree | 4bc08fd6b6b674e49be285c9e154f2901f29e25c | |
| parent | 2ba2744fb00046892d06b85c7283a8f2baeca561 (diff) | |
| download | rockbox-33975fbbda881c11976d2d8ff6c42e0df0518c28.zip rockbox-33975fbbda881c11976d2d8ff6c42e0df0518c28.tar.gz rockbox-33975fbbda881c11976d2d8ff6c42e0df0518c28.tar.bz2 rockbox-33975fbbda881c11976d2d8ff6c42e0df0518c28.tar.xz | |
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
| -rw-r--r-- | apps/misc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/misc.c b/apps/misc.c index 4e1de7a..f95abb8 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); |