Skip to content

Commit ed44415

Browse files
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Co-authored-by: Barney Gale <[email protected]>
1 parent 7476154 commit ed44415

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

0 commit comments

Comments
 (0)