Skip to content

Commit c7d812d

Browse files
arhadthedevmiss-islington
authored andcommitted
pythongh-94844: Add pathlib support to shutil archive management (pythonGH-94846)
Co-authored-by: Barney Gale <[email protected]> (cherry picked from commit ed44415) Co-authored-by: Oleg Iarygin <[email protected]>
1 parent 1c3b2fe commit c7d812d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/shutil.py

+2
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
11081108
save_cwd = None
11091109
if root_dir is not None:
11101110
if support_root_dir:
1111+
# Support path-like base_name here for backwards-compatibility.
1112+
base_name = os.fspath(base_name)
11111113
kwargs['root_dir'] = root_dir
11121114
else:
11131115
save_cwd = os.getcwd()

0 commit comments

Comments
 (0)