From 4e4a927d1f893c752bf89051df7aeed5e13ec6f3 Mon Sep 17 00:00:00 2001 From: MistrKernnunos Date: Tue, 6 Dec 2022 11:20:02 +0100 Subject: [PATCH] Fix finding latest gcode Remember temporaty newest time while checking other files --- src/gui/screen_home.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/screen_home.cpp b/src/gui/screen_home.cpp index 749d180696..e99b5e5aac 100644 --- a/src/gui/screen_home.cpp +++ b/src/gui/screen_home.cpp @@ -219,6 +219,7 @@ static bool find_latest_gcode(char *fpath, int fpath_len, char *fname, int fname if (is_newer) { strlcpy(fpath + 5, dir.fno->d_name, fpath_len - 5); strlcpy(fname, dir.fno->lfn, fname_len); + latest_time = dir.fno->time; } }