summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/misc.c b/apps/misc.c
index c35e2c5001..4b89a5d4a3 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -28,6 +28,7 @@
28#include "misc.h" 28#include "misc.h"
29#include "lcd.h" 29#include "lcd.h"
30#include "file.h" 30#include "file.h"
31#include "filefuncs.h"
31#ifndef __PCTOOL__ 32#ifndef __PCTOOL__
32#include "lang.h" 33#include "lang.h"
33#include "dir.h" 34#include "dir.h"
@@ -708,11 +709,12 @@ void check_bootfile(bool do_rolo)
708 { 709 {
709 if(!strcasecmp(entry->d_name, BOOTFILE)) 710 if(!strcasecmp(entry->d_name, BOOTFILE))
710 { 711 {
712 struct dirinfo info = dir_get_info(dir, entry);
711 /* found the bootfile */ 713 /* found the bootfile */
712 if(wrtdate && do_rolo) 714 if(wrtdate && do_rolo)
713 { 715 {
714 if((entry->wrtdate != wrtdate) || 716 if((info.wrtdate != wrtdate) ||
715 (entry->wrttime != wrttime)) 717 (info.wrttime != wrttime))
716 { 718 {
717 static const char *lines[] = { ID2P(LANG_BOOT_CHANGED), 719 static const char *lines[] = { ID2P(LANG_BOOT_CHANGED),
718 ID2P(LANG_REBOOT_NOW) }; 720 ID2P(LANG_REBOOT_NOW) };
@@ -722,8 +724,8 @@ void check_bootfile(bool do_rolo)
722 rolo_load(BOOTDIR "/" BOOTFILE); 724 rolo_load(BOOTDIR "/" BOOTFILE);
723 } 725 }
724 } 726 }
725 wrtdate = entry->wrtdate; 727 wrtdate = info.wrtdate;
726 wrttime = entry->wrttime; 728 wrttime = info.wrttime;
727 } 729 }
728 } 730 }
729 closedir(dir); 731 closedir(dir);