From 77339dc8aa8b94ba4603c1ff821590779db3113c Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 27 Sep 2015 17:10:41 +0300 Subject: [PATCH] Deal with too long directory names in write_json on Windows --- asv/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/asv/util.py b/asv/util.py index 6e56e024e..1ca2fc2a2 100644 --- a/asv/util.py +++ b/asv/util.py @@ -524,8 +524,10 @@ def write_json(path, data, api_version=None): Writes JSON to the given path, including indentation and sorting. """ path = os.path.abspath(path) - if not os.path.exists(os.path.dirname(path)): - os.makedirs(os.path.dirname(path)) + + dirname = long_path(os.path.dirname(path)) + if not os.path.exists(dirname): + os.makedirs(dirname) if api_version is not None: data['version'] = api_version