fix(trigger): tolerate unsupported directory fsync

This commit is contained in:
Xubin Ren
2026-07-02 13:32:46 +08:00
parent 661ab00656
commit fd9e57703c
2 changed files with 42 additions and 1 deletions
+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: