From abfdeeb02fafa2cbec3bc572d16c93d08cec1d2c Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Fri, 28 Feb 2020 13:50:28 +0100 Subject: [PATCH] Fix copy-paste error on dir check It was still using path, but that is an import. Instead, we should use the proper computed directory Change-Id: I5b606f61361082c71d0307225490b98db7d9e8c1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2078928 Auto-Submit: Tim van der Lippe Reviewed-by: Jack Franklin Commit-Queue: Tim van der Lippe --- third_party/typescript/ts_library.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/third_party/typescript/ts_library.py b/third_party/typescript/ts_library.py index 08c741b231..645eec7672 100644 --- a/third_party/typescript/ts_library.py +++ b/third_party/typescript/ts_library.py @@ -109,10 +109,11 @@ def copy_all_typescript_sources(sources, output_directory): os.remove(dest) # Make sure that the directory actually exists, otherwise # the copy action will throw an error + dest_directory = path.dirname(dest) try: - os.makedirs(path.dirname(dest)) + os.makedirs(dest_directory) except OSError as exc: # Python >2.5 - if exc.errno == errno.EEXIST and os.path.isdir(path): + if exc.errno == errno.EEXIST and os.path.isdir(dest_directory): pass else: raise