Skip to content

Commit

Permalink
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Browse files Browse the repository at this point in the history
Co-authored-by: Barney Gale <barney.gale@gmail.com>
(cherry picked from commit ed44415)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
  • Loading branch information
miss-islington and arhadthedev authored Jul 20, 2022
1 parent 16cb8ca commit 6cc9489
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6cc9489

Please sign in to comment.