diff options
author | James Zern <jzern@google.com> | 2012-03-29 18:13:27 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2012-03-29 18:13:27 -0700 |
commit | 00794a93eccb7299942bd833df83d6756e6b7463 (patch) | |
tree | 6708825903ef3d31fbdc41afff5af13c0716e0c3 | |
parent | 8b15cf69290ca658d921266fe8fc92861ed5f4ab (diff) | |
download | libvpx-00794a93eccb7299942bd833df83d6756e6b7463.tar.gz |
tools/wrap-commit-msg.py: fix file truncation
truncate() operates from the current file pointer position. On at least
Linux specifying 0 without resetting the pointer will pad the file with
zeros to the current offset.
Change-Id: Ide704a1097f46c0c530f27212bb12e923f93e2d6
-rwxr-xr-x | tools/wrap-commit-msg.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/wrap-commit-msg.py b/tools/wrap-commit-msg.py index b53926ae1..d5b4b046b 100755 --- a/tools/wrap-commit-msg.py +++ b/tools/wrap-commit-msg.py @@ -59,6 +59,7 @@ def main(fileobj): if fileobj == sys.stdin: fileobj = sys.stdout else: + fileobj.seek(0) fileobj.truncate(0) fileobj.write(output) |