diff --git a/src/os.cpp b/src/os.cpp index 7157867358..8eb6b34654 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -1838,7 +1838,7 @@ Error os_file_open_r(Buf *full_path, OsFile *out_file, OsTimeStamp *mtime) { if (mtime != nullptr) { FILETIME last_write_time; - if (!GetFileTime(file, nullptr, nullptr, &last_write_time)) { + if (!GetFileTime(result, nullptr, nullptr, &last_write_time)) { CloseHandle(result); return ErrorUnexpected; }