File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change
1
+ Fix :data: `os.DirEntry.inode ` dropping higher 64 bits of a file id on some filesystems on Windows.
Original file line number Diff line number Diff line change @@ -14805,6 +14805,7 @@ typedef struct {
14805
14805
#ifdef MS_WINDOWS
14806
14806
struct _Py_stat_struct win32_lstat ;
14807
14807
uint64_t win32_file_index ;
14808
+ uint64_t win32_file_index_high ;
14808
14809
int got_file_index ;
14809
14810
#else /* POSIX */
14810
14811
#ifdef HAVE_DIRENT_D_TYPE
@@ -15134,11 +15135,10 @@ os_DirEntry_inode_impl(DirEntry *self)
15134
15135
}
15135
15136
15136
15137
self -> win32_file_index = stat .st_ino ;
15138
+ self -> win32_file_index_high = stat .st_ino_high ;
15137
15139
self -> got_file_index = 1 ;
15138
15140
}
15139
- static_assert (sizeof (unsigned long long ) >= sizeof (self -> win32_file_index ),
15140
- "DirEntry.win32_file_index is larger than unsigned long long" );
15141
- return PyLong_FromUnsignedLongLong (self -> win32_file_index );
15141
+ return _pystat_l128_from_l64_l64 (self -> win32_file_index , self -> win32_file_index_high );
15142
15142
#else /* POSIX */
15143
15143
static_assert (sizeof (unsigned long long ) >= sizeof (self -> d_ino ),
15144
15144
"DirEntry.d_ino is larger than unsigned long long" );
You can’t perform that action at this time.
0 commit comments