]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94844: Add pathlib support to shutil archive management (GH-94846)
authorOleg Iarygin <oleg@arhadthedev.net>
Wed, 20 Jul 2022 15:55:12 +0000 (18:55 +0300)
committerGitHub <noreply@github.com>
Wed, 20 Jul 2022 15:55:12 +0000 (18:55 +0300)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Lib/shutil.py

index f4128647861b81c60720ebe48f8622bfbf1099ef..b49437cd1f3e87ce08ca23c325397f92d4147299 100644 (file)
@@ -1118,6 +1118,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
     save_cwd = None
     if root_dir is not None:
         if support_root_dir:
+            # Support path-like base_name here for backwards-compatibility.
+            base_name = os.fspath(base_name)
             kwargs['root_dir'] = root_dir
         else:
             save_cwd = os.getcwd()