From 7e29d9b5c36527398d19ac318b28940df3392af8 Mon Sep 17 00:00:00 2001 From: Unrud Date: Tue, 1 Feb 2022 20:23:24 +0100 Subject: [PATCH] Revert "Assume F_FULLFSYNC on darwin" --- CHANGELOG.md | 1 - radicale/pathutils.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8e98c4..3838914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ * Fallback if RENAME_EXCHANGE is not supportd by the filesystem * Assume POSIX compatibility if `sys.platform` is not `win32` -* Assume `F_FULLFSYNC` always exists if `sys.platform` is `darwin` ## 3.1.3 diff --git a/radicale/pathutils.py b/radicale/pathutils.py index 448817e..56e6fa0 100644 --- a/radicale/pathutils.py +++ b/radicale/pathutils.py @@ -193,7 +193,7 @@ def rename_exchange(src: str, dst: str) -> None: def fsync(fd: int) -> None: - if sys.platform == "darwin": + if sys.platform != "win32" and hasattr(fcntl, "F_FULLFSYNC"): fcntl.fcntl(fd, fcntl.F_FULLFSYNC) else: os.fsync(fd)