Junio C Hamano schrieb:
You memcpy() what the library gave you in *result to the statically allocated "temp". d_name[] in "temp" comes from the structure definition in the user visible include file, which could be much shorter than what the library gave you in *result. The structure definition I showed in my message you are responding to illustrates the issue. If MacOS uses a similar trick to define d_name[256] and sometimes returns much longer name in *result, you are truncating the name by copying only thefirst part of the structure and first 256 bytes of d_name[].
Now I understand what you mean. Ok, I'll try to change this and make this work on other platforms too.
I didn't know that the readdir function is allowed to return something longer for d_name than the specified length.
Regards, Mark
Attachment:
binGwO7EBjeVU.bin
Description: application/applefile
Attachment:
0001-Use-FIX_UTF8_#7B1A40.patch
Description: Binary data