Use SHFileOperationW for remove_all on Windows

This commit is contained in:
gingerBill
2024-07-23 17:30:42 +01:00
parent a28392852a
commit 65fec9134e
3 changed files with 29 additions and 57 deletions
+2 -1
View File
@@ -109,11 +109,12 @@ _open_internal :: proc(name: string, flags: File_Flags, perm: int) -> (handle: u
case 0:
return uintptr(h), nil
case:
return 0, Platform_Error(e)
return 0, _get_platform_error()
}
}
}
}
h := win32.CreateFileW(path, access, share_mode, &sa, create_mode, attrs, nil)
if h == win32.INVALID_HANDLE {
return 0, _get_platform_error()