mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
This commit is contained in:
parent
7476154886
commit
ed4441567e
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue