From c50ddc6cd8a7290ed0fcec9824a64ff05be5e044 Mon Sep 17 00:00:00 2001 From: gitlost Date: Fri, 9 Dec 2022 19:46:53 +0000 Subject: [PATCH] out_maybe_mkdir: explicit `CreateDirectoryA()` & `GetFileAttributesA()` --- backend/output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/output.c b/backend/output.c index c8d79ac8..81e6198d 100644 --- a/backend/output.c +++ b/backend/output.c @@ -767,7 +767,7 @@ static int out_maybe_mkdir(const char* path) DWORD dwAttrib; /* Try to make the directory */ - if (CreateDirectory(path, NULL) != 0) { /* Non-zero on success */ + if (CreateDirectoryA(path, NULL) != 0) { /* Non-zero on success */ return 0; } /* If it fails for any reason but already exists, fail */ @@ -775,7 +775,7 @@ static int out_maybe_mkdir(const char* path) return -1; } /* Check if the existing path is a directory */ - if ((dwAttrib = GetFileAttributes(path)) == (DWORD) -1 || !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) { + if ((dwAttrib = GetFileAttributesA(path)) == (DWORD) -1 || !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) { return -1; } #else