diff --git a/nob.h b/nob.h index 2735a93..b4d803c 100644 --- a/nob.h +++ b/nob.h @@ -2373,7 +2373,7 @@ NOBDEF int nob_needs_rebuild(const char *output_path, const char **input_paths, #ifdef _WIN32 BOOL bSuccess; - HANDLE output_path_fd = CreateFile(output_path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); + HANDLE output_path_fd = CreateFile(output_path, 0, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); if (output_path_fd == INVALID_HANDLE_VALUE) { // NOTE: if output does not exist it 100% must be rebuilt if (GetLastError() == ERROR_FILE_NOT_FOUND) return 1; @@ -2390,7 +2390,7 @@ NOBDEF int nob_needs_rebuild(const char *output_path, const char **input_paths, for (size_t i = 0; i < input_paths_count; ++i) { const char *input_path = input_paths[i]; - HANDLE input_path_fd = CreateFile(input_path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); + HANDLE input_path_fd = CreateFile(input_path, 0, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); if (input_path_fd == INVALID_HANDLE_VALUE) { // NOTE: non-existing input is an error cause it is needed for building in the first place nob_log(NOB_ERROR, "Could not open file %s: %s", input_path, nob_win32_error_message(GetLastError()));