mirror of
https://github.com/python/cpython.git
synced 2025-07-16 15:55:18 +00:00
gh-104820: Fixes os.stat on Windows to better handle file systems that do not support FileIdInformation (GH-104892)
(cherry picked from commit 6031727a37
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
635ce29257
commit
68bf3fe0e4
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