Skip to content
Snippets Groups Projects
Unverified Commit ed444156 authored by Oleg Iarygin's avatar Oleg Iarygin Committed by GitHub
Browse files

gh-94844: Add pathlib support to shutil archive management (GH-94846)

parent 74761548
Branches
Tags
No related merge requests found
...@@ -1118,6 +1118,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, ...@@ -1118,6 +1118,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
save_cwd = None save_cwd = None
if root_dir is not None: if root_dir is not None:
if support_root_dir: if support_root_dir:
# Support path-like base_name here for backwards-compatibility.
base_name = os.fspath(base_name)
kwargs['root_dir'] = root_dir kwargs['root_dir'] = root_dir
else: else:
save_cwd = os.getcwd() save_cwd = os.getcwd()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment