From 0be7b620c957f84b7ab9f3afbadbcfda7d7faf11 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sun, 1 Mar 2026 09:00:16 +0100 Subject: [PATCH] Improve path collision check formatting Refactor path collision check for readability. --- radicale/pathutils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radicale/pathutils.py b/radicale/pathutils.py index cdbebd6c..b1ddce00 100644 --- a/radicale/pathutils.py +++ b/radicale/pathutils.py @@ -285,9 +285,8 @@ def path_to_filesystem(root: str, sane_path: str) -> str: safe_path = os.path.join(safe_path, part) # Check for conflicting files (e.g. case-insensitive file systems # or short names on Windows file systems) - if (os.path.lexists(safe_path) and - not os.path.realpath(safe_path).endswith(part)): - raise CollidingPathError(part) + if (os.path.lexists(safe_path) and not os.path.realpath(safe_path).endswith(part)): + raise CollidingPathError(part) return safe_path