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 @@ -14528,6 +14528,7 @@ typedef struct {
14528
14528
#ifdef MS_WINDOWS
14529
14529
struct _Py_stat_struct win32_lstat ;
14530
14530
uint64_t win32_file_index ;
14531
+ uint64_t win32_file_index_high ;
14531
14532
int got_file_index ;
14532
14533
#else /* POSIX */
14533
14534
#ifdef HAVE_DIRENT_D_TYPE
@@ -14859,11 +14860,10 @@ os_DirEntry_inode_impl(DirEntry *self)
14859
14860
}
14860
14861
14861
14862
self -> win32_file_index = stat .st_ino ;
14863
+ self -> win32_file_index_high = stat .st_ino_high ;
14862
14864
self -> got_file_index = 1 ;
14863
14865
}
14864
- static_assert (sizeof (unsigned long long ) >= sizeof (self -> win32_file_index ),
14865
- "DirEntry.win32_file_index is larger than unsigned long long" );
14866
- return PyLong_FromUnsignedLongLong (self -> win32_file_index );
14866
+ return _pystat_l128_from_l64_l64 (self -> win32_file_index , self -> win32_file_index_high );
14867
14867
#else /* POSIX */
14868
14868
static_assert (sizeof (unsigned long long ) >= sizeof (self -> d_ino ),
14869
14869
"DirEntry.d_ino is larger than unsigned long long" );
You can’t perform that action at this time.
0 commit comments