os.cpp: fix regression on Windows from 59c050e7

This commit is contained in:
Andrew Kelley 2019-01-31 16:52:59 -05:00
parent 545064c1d9
commit 28873e7622

View File

@ -1838,7 +1838,7 @@ Error os_file_open_r(Buf *full_path, OsFile *out_file, OsTimeStamp *mtime) {
if (mtime != nullptr) { if (mtime != nullptr) {
FILETIME last_write_time; FILETIME last_write_time;
if (!GetFileTime(file, nullptr, nullptr, &last_write_time)) { if (!GetFileTime(result, nullptr, nullptr, &last_write_time)) {
CloseHandle(result); CloseHandle(result);
return ErrorUnexpected; return ErrorUnexpected;
} }