8000 bpo-46785: Fix race condition between `os.stat()` and unlink by itaisteinherz · Pull Request #31858 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46785: Fix race condition between os.stat() and unlink #31858

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document caught error codes
  • Loading branch information
itaisteinherz committed Mar 13, 2022
commit d576c3ff9ae0f5931145f68139d55f98ba26f81d
8 changes: 4 additions & 4 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1890,10 +1890,10 @@ win32_xstat_impl(const wchar_t *path, struct _Py_stat_struct *result,
/* Cannot read the parent directory. */
DWORD dir_error = GetLastError();
switch (GetLastError()) {
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
case ERROR_NOT_READY:
case ERROR_BAD_NET_NAME:
case ERROR_FILE_NOT_FOUND: /* File cannot be found */
case ERROR_PATH_NOT_FOUND: /* File parent directory cannot be found */
case ERROR_NOT_READY: /* Drive exists but unavailable */
case ERROR_BAD_NET_NAME: /* Remote drive unavailable */
break;
/* Restore the error from CreateFileW(). */
default:
Expand Down
0