10000 Merge remote-tracking branch 'origin/win-isdir-fastpath' into win-isd… · python/cpython@8fff56b · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fff56b

Browse files
committed
Merge remote-tracking branch 'origin/win-isdir-fastpath' into win-isdir-fastpath
2 parents 0e465dc + be6b592 commit 8fff56b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/posixmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15018,7 +15018,7 @@ os__isdir_impl(PyObject *module, PyObject *path)
1501815018
case ERROR_SHARING_VIOLATION:
1501915019
case ERROR_CANT_ACCESS_FILE:
1502015020
case ERROR_INVALID_PARAMETER:
15021-
if (win32_stat(_path.wide, &st)) {
15021+
if (STAT(_path.wide, &st)) {
1502215022
result = 0;
1502315023
} else {
1502415024
result = S_ISDIR(st.st_mode);
@@ -15097,7 +15097,7 @@ os__isfile_impl(PyObject *module, PyObject *path)
1509715097
case ERROR_SHARING_VIOLATION:
1509815098
case ERROR_CANT_ACCESS_FILE:
1509915099
case ERROR_INVALID_PARAMETER:
15100-
if (win32_stat(_path.wide, &st)) {
15100+
if (STAT(_path.wide, &st)) {
1510115101
result = 0;
1510215102
} else {
1510315103
result = S_ISREG(st.st_mode);
@@ -15172,7 +15172,7 @@ os__exists_impl(PyObject *module, PyObject *path)
1517215172
case ERROR_SHARING_VIOLATION:
1517315173
case ERROR_CANT_ACCESS_FILE:
1517415174
case ERROR_INVALID_PARAMETER:
15175-
if (win32_stat(_path.wide, &st)) {
15175+
if (STAT(_path.wide, &st)) {
1517615176
result = 0;
1517715177
} else {
1517815178
result = 1;
@@ -15252,7 +15252,7 @@ os__islink_impl(PyObject *module, PyObject *path)
1525215252
case ERROR_SHARING_VIOLATION:
1525315253
case ERROR_CANT_ACCESS_FILE:
1525415254
case ERROR_INVALID_PARAMETER:
15255-
if (win32_stat(_path.wide, &st)) {
15255+
if (LSTAT(_path.wide, &st)) {
1525615256
result = 0;
1525715257
} else {
1525815258
result = S_ISLNK(st.st_mode);

0 commit comments

Comments
 (0)
0