Core: POSIX fixes of invalid file handling

This commit is contained in:
Mirek Fidler 2024-11-23 12:01:07 +01:00
parent 696b3fab7f
commit e0275b59cd
3 changed files with 10 additions and 6 deletions

View file

@ -467,12 +467,16 @@ FileTime Time::AsFileTime() const
#ifdef PLATFORM_POSIX
Time::Time(FileTime filetime) {
if(filetime) {
struct tm time_r;
struct tm *time = localtime_r(&filetime.ft, &time_r);
if(time)
*this = Time(time->tm_year + 1900, time->tm_mon + 1, time->tm_mday,
time->tm_hour, time->tm_min, time->tm_sec);
}
else
*this = Null;
}
FileTime Time::AsFileTime() const {
struct tm time;

View file

@ -3,7 +3,7 @@ uses
file
InvalidFile.cpp,
etalon.log;
Etalon.log;
mainconfig
"" = "";