fix(trigger): tolerate unsupported directory fsync

This commit is contained in:
Xubin Ren committed 2026-07-02 13:32:46 +08:00
1 parent 661ab00656
commit fd9e57703c
2 files changed
+42 -1

No files matched your search

+6 -1
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import errno
import json
import os
import secrets
@@ -402,7 +403,11 @@ class LocalTriggerStore:
with suppress(PermissionError):
fd = os.open(str(path.parent), os.O_RDONLY)
try:
os.fsync(fd)
try:
os.fsync(fd)
except OSError as exc:
if exc.errno != errno.EINVAL:
raise
finally:
os.close(fd)
except BaseException: