Skip to content

Commit 6209491

Browse files
committed
gh-143668: Introduce explicit path-like object support for in
1 parent de8e204 commit 6209491

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/shutil.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
12201220
supports_root_dir = getattr(func, 'supports_root_dir', False)
12211221
save_cwd = None
12221222
if root_dir is not None:
1223+
root_dir = os.fspath(root_dir)
12231224
stmd = os.stat(root_dir).st_mode
12241225
if not stat.S_ISDIR(stmd):
12251226
raise NotADirectoryError(errno.ENOTDIR, 'Not a directory', root_dir)

0 commit comments

Comments
 (0)