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 <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
This commit is contained in:
Tim van der Lippe
2020-02-28 13:13:07 +00:00
committed by Commit Bot
parent 1a3ae5481b
commit abfdeeb02f
+3 -2
View File
@@ -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