We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f040872 commit 6b78709Copy full SHA for 6b78709
1 file changed
fs/osfs.py
@@ -152,8 +152,10 @@ def _make_details_from_stat(cls, stat_result):
152
'size': stat_result.st_size,
153
'type': int(cls._get_type_from_stat(stat_result))
154
}
155
- if hasattr(stat_result, 'st_birthtime'):
156
- details['created'] = stat_result.st_birthtime
+ # On other Unix systems (such as FreeBSD), the following
+ # attributes may be available (but may be only filled out if
157
+ # root tries to use them):
158
+ details['created'] = getattr(stat_result, 'st_birthtime', None)
159
ctime_key = (
160
'created'
161
if _WINDOWS_PLATFORM
0 commit comments