Skip to content

Commit cadf202

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 16cb8ca commit cadf202

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
@@ -1117,6 +1117,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
11171117
save_cwd = None
11181118
if root_dir is not None:
11191119
if support_root_dir:
1120+
# Support path-like base_name here for backwards-compatibility.
1121+
base_name = os.fspath(base_name)
11201122
kwargs['root_dir'] = root_dir
11211123
else:
11221124
save_cwd = os.getcwd()

0 commit comments

Comments
 (0)