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 /apps | |
parent | 2ba2744fb00046892d06b85c7283a8f2baeca561 (diff) | |
download | rockbox-33975fbbda881c11976d2d8ff6c42e0df0518c28.tar.gz rockbox-33975fbbda881c11976d2d8ff6c42e0df0518c28.zip |
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
Diffstat (limited to 'apps')
-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 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) | |||
885 | */ | 885 | */ |
886 | void check_bootfile(bool do_rolo) | 886 | void check_bootfile(bool do_rolo) |
887 | { | 887 | { |
888 | static int boot_size = 0; | 888 | static int wrtdate = 0; |
889 | static int boot_cluster = 0; | 889 | static int wrttime = 0; |
890 | DIR* dir = NULL; | 890 | DIR* dir = NULL; |
891 | struct dirent* entry = NULL; | 891 | struct dirent* entry = NULL; |
892 | 892 | ||
@@ -901,10 +901,10 @@ void check_bootfile(bool do_rolo) | |||
901 | if(!strcasecmp(entry->d_name, BOOTFILE)) | 901 | if(!strcasecmp(entry->d_name, BOOTFILE)) |
902 | { | 902 | { |
903 | /* found the bootfile */ | 903 | /* found the bootfile */ |
904 | if(boot_size && do_rolo) | 904 | if(wrtdate && do_rolo) |
905 | { | 905 | { |
906 | if((entry->size != boot_size) || | 906 | if((entry->wrtdate != wrtdate) || |
907 | (entry->startcluster != boot_cluster)) | 907 | (entry->wrttime != wrttime)) |
908 | { | 908 | { |
909 | char *lines[] = { str(LANG_BOOT_CHANGED), | 909 | char *lines[] = { str(LANG_BOOT_CHANGED), |
910 | str(LANG_REBOOT_NOW) }; | 910 | str(LANG_REBOOT_NOW) }; |
@@ -914,8 +914,8 @@ void check_bootfile(bool do_rolo) | |||
914 | rolo_load(BOOTDIR "/" BOOTFILE); | 914 | rolo_load(BOOTDIR "/" BOOTFILE); |
915 | } | 915 | } |
916 | } | 916 | } |
917 | boot_size = entry->size; | 917 | wrtdate = entry->wrtdate; |
918 | boot_cluster = entry->startcluster; | 918 | wrttime = entry->wrttime; |
919 | } | 919 | } |
920 | } | 920 | } |
921 | closedir(dir); | 921 | closedir(dir); |