mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 17:05:37 -04:00
Incrementing date workaround for dead RTC battery (#1479)
* Enable f_utime function * Added file_update_date() function * Added rtc_battery_workaround() function * Update ui_navigation.cpp
This commit is contained in:
parent
e5546159c5
commit
65e71508ac
5 changed files with 66 additions and 5 deletions
|
@ -325,6 +325,14 @@ FATTimestamp file_created_date(const std::filesystem::path& file_path) {
|
|||
return {filinfo.fdate, filinfo.ftime};
|
||||
}
|
||||
|
||||
std::filesystem::filesystem_error file_update_date(const std::filesystem::path& file_path, FATTimestamp timestamp) {
|
||||
FILINFO filinfo{};
|
||||
|
||||
filinfo.fdate = timestamp.FAT_date;
|
||||
filinfo.ftime = timestamp.FAT_time;
|
||||
return f_utime(reinterpret_cast<const TCHAR*>(file_path.c_str()), &filinfo);
|
||||
}
|
||||
|
||||
std::filesystem::filesystem_error make_new_file(
|
||||
const std::filesystem::path& file_path) {
|
||||
File f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue