From 50825b2e47238f7848f00388a8ff07001eb8f26d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 27 Feb 2026 17:41:49 +0200 Subject: [PATCH] Fix os.path.commonprefix deprecation --- src/manage/fsutils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/manage/fsutils.py b/src/manage/fsutils.py index 3fa29c3..50aaab2 100644 --- a/src/manage/fsutils.py +++ b/src/manage/fsutils.py @@ -153,7 +153,10 @@ def rmtree(path, after_5s_warning=None, remove_ext_first=()): _rmdir(d, on_fail=to_warn.append, on_isfile=to_unlink) if to_warn: - f = os.path.commonprefix(to_warn) + try: + f = os.path.commonpath(to_warn) + except ValueError: + f = None if f: LOGGER.warn("Failed to remove %s", f) else: