FIY: libzip and UTF-8 on Win32

Lubomir I. Ivanov neolit123 at gmail.com
Sun Feb 22 13:39:35 PST 2015


On 22 February 2015 at 23:17, Thiago Macieira <thiago at macieira.org> wrote:
> On Sunday 22 February 2015 03:56:16 Lubomir I. Ivanov wrote:
>> after checking both the source code of QTemporaryFile and libzip in
>> terms of Win32 API and doing more testing, i would say this is more of
>> a libzip corner case in how shared access is obtained on file handles.
>
> Does libzip try to obtain exclusive access to the file?
>

yes, it requested more exclusive access than the handle from
QTemporaryFile, by not allowing shared writing on the file.
which is not what fopen() does as we've discussed on their ML.

libzip:
CreateFile[A / W](ctx->fname, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

the patch to fix that is pending to be pushed and contains:
FILE_SHARE_READ | FILE_SHARE_WRITE

lubomir
--


More information about the subsurface mailing list