summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorOleg Iarygin <oleg@arhadthedev.net>2022-07-20 15:55:12 (GMT)
committerGitHub <noreply@github.com>2022-07-20 15:55:12 (GMT)
commited4441567ec480d1e4d8f982bd1f7347e4d03c42 (patch)
treef1c3e7d9d4ce4b9e8cd21a710e3b161b1b64c914 /Lib
parent74761548862eb5a324c23d86a6233d884f386f2e (diff)
downloadcpython-ed4441567ec480d1e4d8f982bd1f7347e4d03c42.zip
cpython-ed4441567ec480d1e4d8f982bd1f7347e4d03c42.tar.gz
cpython-ed4441567ec480d1e4d8f982bd1f7347e4d03c42.tar.bz2
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/shutil.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index f412864..b49437c 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -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()