summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-20 16:24:33 (GMT)
committerGitHub <noreply@github.com>2022-07-20 16:24:33 (GMT)
commitcbe3ad51ed63e2e5afc408f0bbeb8bb0e9fb7f44 (patch)
tree470b5a3f7b523cbe18bcdfada9c1677832d67715 /Lib/shutil.py
parent1c3b2fe0fa6bc5b3300edd0a8fb9facaeb61f5b1 (diff)
downloadcpython-cbe3ad51ed63e2e5afc408f0bbeb8bb0e9fb7f44.zip
cpython-cbe3ad51ed63e2e5afc408f0bbeb8bb0e9fb7f44.tar.gz
cpython-cbe3ad51ed63e2e5afc408f0bbeb8bb0e9fb7f44.tar.bz2
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Co-authored-by: Barney Gale <barney.gale@gmail.com> (cherry picked from commit ed4441567ec480d1e4d8f982bd1f7347e4d03c42) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 90dcaa7..0d27880 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -1108,6 +1108,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()