mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-117267: Ensure DirEntry.stat().st_ctime still contains creation time during deprecation period (GH-117354)
(cherry picked from commit 985917dc8d
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
fad48ea181
commit
eca377f203
2 changed files with 9 additions and 0 deletions
|
@ -15050,6 +15050,10 @@ DirEntry_from_find_data(PyObject *module, path_t *path, WIN32_FIND_DATAW *dataW)
|
|||
find_data_to_file_info(dataW, &file_info, &reparse_tag);
|
||||
_Py_attribute_data_to_stat(&file_info, reparse_tag, NULL, NULL, &entry->win32_lstat);
|
||||
|
||||
/* ctime is only deprecated from 3.12, so we copy birthtime across */
|
||||
entry->win32_lstat.st_ctime = entry->win32_lstat.st_birthtime;
|
||||
entry->win32_lstat.st_ctime_nsec = entry->win32_lstat.st_birthtime_nsec;
|
||||
|
||||
return (PyObject *)entry;
|
||||
|
||||
error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue