From 38e2f307991aa1d4d9c8f512bd9b4a656057355b Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Mon, 26 Sep 2022 21:51:21 +0400 Subject: [win32] Fix file utils --- source/kit/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/kit/file.c b/source/kit/file.c index 17aae79..b05415f 100644 --- a/source/kit/file.c +++ b/source/kit/file.c @@ -219,7 +219,7 @@ static void unix_prepare_path_(char *const buf, kit_status_t kit_file_create_folder(kit_str_t const path) { PREPARE_PATH_BUF_; #if defined(_WIN32) && !defined(__CYGWIN__) - if (CreateDirectoryW(temp, NULL)) + if (CreateDirectoryW(buf, NULL)) return KIT_OK; #else if (mkdir(buf, 0755) == 0) @@ -319,7 +319,7 @@ ptrdiff_t kit_file_size(kit_str_t const path) { PREPARE_PATH_BUF_; #if defined(_WIN32) && !defined(__CYGWIN__) HFILE f = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL); + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (f != INVALID_HANDLE_VALUE) { DWORD high; DWORD low = GetFileSize(f, &high); -- cgit v1.2.3