Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-118507 : Refactornt._path_is*#118755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
ab76c061c5350dd7017ac2963338e833f04d0493c24403f4a7a9038fa6ec86d30603f0cd7c6d0168d299e00df4cb31a25259e140776acc0d2c8e464a8bc5f255b6b8061a62ceba79151515341301568bb07629c60fcffb5cae7a55cbf0bc44c0a3f75bf963e71cb7f024d27496edc3b3c6dae2c05dd20e2ced928dfd41967a7e94250b3612eab1cb46f6b07b0ca58a03f1ea76222c58a6e41cbfFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Co-authored-by: Eryk Sun <eryksun@gmail.com>
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -5131,7 +5131,7 @@ _testFileTypeByHandle(HANDLE hfile, int testedType, BOOL diskOnly) | ||
| return FALSE; | ||
nineteendo marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| } | ||
| if (testedType != PY_IFREG && testedType != PY_IFDIR) { | ||
| FILE_ATTRIBUTE_TAG_INFO info; | ||
nineteendo marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| return GetFileInformationByHandleEx(hfile, FileAttributeTagInfo, &info, | ||
| sizeof(info)) && | ||
| @@ -5156,7 +5156,7 @@ _testFileTypeByName(LPCWSTR path, int testedType) | ||
| { | ||
| BOOL result = _testInfo(info.FileAttributes, info.ReparseTag, | ||
| testedType); | ||
| if (!result ||(testedType != PY_IFREG&& testedType != PY_IFDIR) || | ||
| !(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) | ||
| { | ||
| return result; | ||
| @@ -5191,6 +5191,8 @@ _testFileTypeByName(LPCWSTR path, int testedType) | ||
| rc = STAT(path, &st); | ||
| } | ||
| else { | ||
| // PY_IFRRP is not generally supported in this case, except for | ||
| // unhandled reparse points such as IO_REPARSE_TAG_APPEXECLINK. | ||
| rc = LSTAT(path, &st); | ||
nineteendo marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| } | ||
| if (!rc) { | ||
| @@ -5252,7 +5254,8 @@ _testFileExistsByName(LPCWSTR path, BOOL followLinks) | ||
| case ERROR_SHARING_VIOLATION: | ||
| case ERROR_CANT_ACCESS_FILE: | ||
| case ERROR_INVALID_PARAMETER: | ||
| STRUCT_STAT _st; | ||
| return followLinks ? !STAT(path, &_st): !LSTAT(path, &_st); | ||
| } | ||
| return FALSE; | ||