Skip to content

Commit 21de74d

Browse files
gh-144050: Fix stat.filemode file type detection in pure Python
1 parent ab7c34a commit 21de74d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/stat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def filemode(mode):
167167
for index, table in enumerate(_filemode_table):
168168
for bit, char in table:
169169
if index == 0:
170-
if (mode & S_IFMT) == bit:
170+
if S_IFMT(mode) == bit:
171171
perm.append(char)
172172
break
173173
else:

0 commit comments

Comments
 (0)