diff options
author | Björn-Egil Dahlberg <[email protected]> | 2011-12-02 15:17:28 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2011-12-02 15:41:14 +0100 |
commit | b7f7f363c44aaf0bd29e877f8060b806963458ce (patch) | |
tree | a5359f593ee4f9840b701ca787fda95392c4c448 /erts/emulator/drivers/win32 | |
parent | 73b4ed6d1141e760fcc108e45d3d66ca110f1018 (diff) | |
download | otp-b7f7f363c44aaf0bd29e877f8060b806963458ce.tar.gz otp-b7f7f363c44aaf0bd29e877f8060b806963458ce.tar.bz2 otp-b7f7f363c44aaf0bd29e877f8060b806963458ce.zip |
Fix undefined ctime for invalid file handles
* ctime were never defined for invalid file handles
* fix epoch <-> fileinfo conversions
Diffstat (limited to 'erts/emulator/drivers/win32')
-rw-r--r-- | erts/emulator/drivers/win32/win_efile.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/erts/emulator/drivers/win32/win_efile.c b/erts/emulator/drivers/win32/win_efile.c index 134c4b675f..630d2b4df8 100644 --- a/erts/emulator/drivers/win32/win_efile.c +++ b/erts/emulator/drivers/win32/win_efile.c @@ -59,7 +59,7 @@ #define EPOCH_TO_FILETIME(ft, epoch) \ do { \ ULARGE_INTEGER ull; \ - ull.QuadPart = (((epoch)*TICKS_PER_SECOND) + EPOCH_DIFFERENCE); \ + ull.QuadPart = (((epoch) + EPOCH_DIFFERENCE) + TICKS_PER_SECOND); \ (ft).dwLowDateTime = ull.LowPart; \ (ft).dwHighDateTime = ull.HighPart; \ } while(0) @@ -884,8 +884,7 @@ efile_fileinfo(Efile_error* errInfo, Efile_info* pInfo, findbuf.cFileName[0] = L'\0'; pInfo->links = 1; - pInfo->modifyTime = 0; - pInfo->accessTime = pInfo->modifyTime; + pInfo->cTime = pInfo->accessTime = pInfo->modifyTime = 0; } else { SYSTEMTIME SystemTime; FILETIME LocalFTime; |