Commit 906ab607 authored by Asanka Herath's avatar Asanka Herath Committed by Commit Bot

[blink/bindings] Don't try to create current directory.

`scripts/utilities.py`'s `write_file()` did not handle the case where
the file being written is in the current directory.

Bug: None
Change-Id: I3bb294aa1c45ed3caed9153e2cbb6e73d151391c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055424
Auto-Submit: Asanka Herath <asanka@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741298}
parent bce527f4
......@@ -311,7 +311,7 @@ def write_file(new_text, destination_filename):
return
destination_dirname = os.path.dirname(destination_filename)
if not os.path.exists(destination_dirname):
if destination_dirname and not os.path.exists(destination_dirname):
os.makedirs(destination_dirname)
# Write file in binary so that when run on Windows, line endings are not
# converted
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment