mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Core: POSIX fixes of invalid file handling
This commit is contained in:
parent
696b3fab7f
commit
e0275b59cd
3 changed files with 10 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ uses
|
|||
|
||||
file
|
||||
InvalidFile.cpp,
|
||||
etalon.log;
|
||||
Etalon.log;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue