File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1166,8 +1166,13 @@ _Py_stat_basic_info_to_stat(FILE_STAT_BASIC_INFORMATION *info,
11661166 /* File systems with less than 128-bits zero pad into this field */
11671167 id_128_to_ino file_id ;
11681168 file_id .id = info -> FileId128 ;
1169- result -> st_ino = file_id .st_ino ;
1170- result -> st_ino_high = file_id .st_ino_high ;
1169+ if (file_id .st_ino && file_id .st_ino_high ) {
1170+ result -> st_ino = file_id .st_ino ;
1171+ result -> st_ino_high = file_id .st_ino_high ;
1172+ } else {
1173+ result -> st_ino = info -> FileId .QuadPart ;
1174+ result -> st_ino_high = 0 ;
1175+ }
11711176 /* bpo-37834: Only actual symlinks set the S_IFLNK flag. But lstat() will
11721177 open other name surrogate reparse points without traversing them. To
11731178 detect/handle these, check st_file_attributes and st_reparse_tag. */
You can’t perform that action at this time.
0 commit comments