tboox / tbox

🎁 A glib-like multi-platform c library
https://docs.tboox.org
Apache License 2.0
4.89k stars 725 forks source link

file_info on Window does not support symbol link #232

Open da-liii opened 1 year ago

da-liii commented 1 year ago

Describe the bug

Here is the todo code: https://github.com/tboox/tbox/blob/master/src/tbox/platform/windows/file.c#L410-L411

Expected behavior

Symbol Link should be deteced

Error output

None

Related Environment

Windows

Additional context

Here is the usage of file_info: https://github.com/XmacsLabs/lolly/pull/115

waruqi commented 1 year ago

暂时还没时间和环境测试和支持,你可以直接提个 pr 过来支持上。看 gpt 说的,似乎只需要判断下 FILE_ATTRIBUTE_REPARSE_POINT 就行了,你可以直接测试下

        if (fileAttributes.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
Issues-translate-bot commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically.


There is no time and environment for testing and support yet, you can directly submit a pr to support it. According to what gpt said, it seems that you only need to judge FILE_ATTRIBUTE_REPARSE_POINT, you can test it directly

        if (fileAttributes.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
da-liii commented 1 year ago

嗯嗯 这个我来提pr

Issues-translate-bot commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically.


Hmm, I'm here to mention PR