mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-104820: Fixes os.stat on Windows to better handle file systems that do not support FileIdInformation (GH-104892)
This commit is contained in:
parent
087c1a6539
commit
6031727a37
3 changed files with 12 additions and 5 deletions
|
@ -1132,7 +1132,8 @@ _Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *info, ULONG reparse_tag,
|
|||
file_id.id = id_info->FileId;
|
||||
result->st_ino = file_id.st_ino;
|
||||
result->st_ino_high = file_id.st_ino_high;
|
||||
} else {
|
||||
}
|
||||
if (!result->st_ino && !result->st_ino_high) {
|
||||
/* should only occur for DirEntry_from_find_data, in which case the
|
||||
index is likely to be zero anyway. */
|
||||
result->st_ino = (((uint64_t)info->nFileIndexHigh) << 32) + info->nFileIndexLow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue