summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-20 16:19:35 (GMT)
committerGitHub <noreply@github.com>2022-07-20 16:19:35 (GMT)
commit6cc9489a3aa65fca2903bc162a93b9d572593a6c (patch)
treee825816c47e8ad9d80e436fafff19fedb1b1f823
parent16cb8ca52e404ceadbbbad4c5af498e76feefa1c (diff)
downloadcpython-6cc9489a3aa65fca2903bc162a93b9d572593a6c.zip
cpython-6cc9489a3aa65fca2903bc162a93b9d572593a6c.tar.gz
cpython-6cc9489a3aa65fca2903bc162a93b9d572593a6c.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>
-rw-r--r--Lib/shutil.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 27946de..6093e11 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -1117,6 +1117,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()