Hi.
On 15/7/3 下午6:51, Piotr Caban wrote:
On 07/03/15 06:00, YongHaoHu wrote:
+/* ?_Lstat@sys@tr2@std@@YA?AW4file_type@123@PBDAAH@Z */ +/* ?_Lstat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z */ +file_type tr2_sys__Lstat(char const* path, int *err_code) +{
- DWORD attr;
- TRACE("(%s %p)\n", debugstr_a(path), err_code);
- if(!path) {
*err_code = ERROR_INVALID_PARAMETER;
return status_unknown;
- }
- attr = GetFileAttributesA(path);
- if(attr == INVALID_FILE_ATTRIBUTES)
return stat_set_error(err_code);
- if(attr & FILE_ATTRIBUTE_REPARSE_POINT)
FIXME("reparse point is not supported yet\n");
- *err_code = ERROR_SUCCESS;
- return (attr &
FILE_ATTRIBUTE_DIRECTORY)?directory_file:regular_file; +}
What's the reason for not calling tr2_sys__Stat function here?
The handling of REPARSE_POINT in tr2_sys__Stat is different from tr2_sys__Lstat, so we need to implement it again. That's why I want to reuse my function stat_set_error. Regarding ERROR_SUCCESS, I handle it wrong. Thank you. ;)