summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2022-09-26 21:51:21 +0400
committerMitya Selivanov <automainint@guattari.tech>2022-09-26 21:51:21 +0400
commit38e2f307991aa1d4d9c8f512bd9b4a656057355b (patch)
tree352ac35adf768faef3a5ceccca803d4f5cb51af2 /source
parent17ef5e24ad6642728bea54779dd8ff8ee45c175f (diff)
downloadkit-38e2f307991aa1d4d9c8f512bd9b4a656057355b.zip
[win32] Fix file utils
Diffstat (limited to 'source')
-rw-r--r--source/kit/file.c4
1 files 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);