This commit is contained in:
Rayyan Ansari 2026-07-06 21:10:23 +00:00 committed by GitHub
commit b26dc50e1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -186,8 +186,8 @@ def is_utime_fully_supported():
else:
open(filepath, "w").close()
try:
os.utime(filepath, (1000, 2000), follow_symlinks=False)
new_stats = os.stat(filepath, follow_symlinks=False)
os.utime(filepath, (1000, 2000), follow_symlinks=False if os.utime in os.supports_follow_symlinks else True)
new_stats = os.stat(filepath, follow_symlinks=False if os.stat in os.supports_follow_symlinks else True)
if new_stats.st_atime == 1000 and new_stats.st_mtime == 2000:
return True
except OSError: