From ecd157527c3d7db60124592c2eae8f0b96c5c1e9 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 29 Mar 2023 00:09:40 +0100 Subject: [PATCH] Revert "Only use FileId128 when it is non-zero" This reverts commit 7a30dba82dfa4b09fc9822ce0bbf4cb6bd1a80d8. --- Python/fileutils.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Python/fileutils.c b/Python/fileutils.c index 1c9a472b1134b3..969b7163b5ac18 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1166,13 +1166,8 @@ _Py_stat_basic_info_to_stat(FILE_STAT_BASIC_INFORMATION *info, /* File systems with less than 128-bits zero pad into this field */ id_128_to_ino file_id; file_id.id = info->FileId128; - if (file_id.st_ino && file_id.st_ino_high) { - result->st_ino = file_id.st_ino; - result->st_ino_high = file_id.st_ino_high; - } else { - result->st_ino = info->FileId.QuadPart; - result->st_ino_high = 0; - } + result->st_ino = file_id.st_ino; + result->st_ino_high = file_id.st_ino_high; /* bpo-37834: Only actual symlinks set the S_IFLNK flag. But lstat() will open other name surrogate reparse points without traversing them. To detect/handle these, check st_file_attributes and st_reparse_tag. */