From a865e8d07193e5a0d9ccb040585bb88082b865ee Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Mon, 2 Dec 2019 16:05:38 +1300 Subject: [PATCH] bpo-35981: apply os.path.abspath only to basedir (for windows) --- Lib/shutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/shutil.py b/Lib/shutil.py index 8f609b312d3..4a55e41a665 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -1027,7 +1027,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, if root_dir is not None: if logger is not None: logger.debug("changing into '%s'", root_dir) - base_name = os.path.abspath(base_name) + base_dir, base_file = os.path.split(base_name) + base_name = os.path.join(os.path.abspath(base_dir), base_file) if not dry_run: os.chdir(root_dir)