From 317e6d70d3b2d2eb16b6f9b656183c49b24b4f07 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 10 Dec 2024 15:44:40 -0500 Subject: Use DeleteFile() instead of remove() --- src/win32/filesystem_win32.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/win32/filesystem_win32.c') diff --git a/src/win32/filesystem_win32.c b/src/win32/filesystem_win32.c index a0f4d27..d26d789 100644 --- a/src/win32/filesystem_win32.c +++ b/src/win32/filesystem_win32.c @@ -123,10 +123,9 @@ zix_create_temporary_directory(ZixAllocator* const allocator, ZixStatus zix_remove(const char* const path) { - return ((zix_file_type(path) == ZIX_FILE_TYPE_DIRECTORY) - ? zix_windows_status(RemoveDirectory(path)) - : remove(path) ? zix_errno_status(errno) - : ZIX_STATUS_SUCCESS); + return zix_windows_status((zix_file_type(path) == ZIX_FILE_TYPE_DIRECTORY) + ? RemoveDirectory(path) + : DeleteFile(path)); } void -- cgit v1.2.1