nih-at / libzip

A C library for reading, creating, and modifying zip archives.
https://libzip.org/
Other
856 stars 275 forks source link

GetSecurityInfo no longer called in zip_source_file_win32_named.c #473

Open helmutw-copadata opened 5 days ago

helmutw-copadata commented 5 days ago

The ifdef checks added to zip_source_file_win32_named.c with #436 are broken. This causes ACL_UNSUPPORTED to be defined when compiling for standard windows application or libraries (Desktop Apps). Therefore GetSecurityInfo is not called in zip_source_file_win32_named.c, line123. This changes the runtime behavior.

0-wiz-0 commented 5 days ago

Windows is not our expertise. What would the correct check look like?

helmutw-copadata commented 5 days ago

I assume the right check is

#if defined(WINAPI_FAMILY_PARTITION) && defined(WINAPI_PARTITION_PC_APP)
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP)
#define ACL_UNSUPPORTED
#endif
#endif

So set ACL_UNSUPPORTED if not a Desktop or Windows Store App, but I am unable to test it with GDK.

0-wiz-0 commented 5 days ago

@sykhro can you please verify that the version above is ok for GDK?