commit | 0fd7de4971c89e782434a402dbb69c5fd17457f9 | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Tue May 16 17:41:42 2017 -0700 |
committer | Ian Lance Taylor <iant@golang.org> | Wed May 17 01:04:53 2017 +0000 |
tree | a6acb3b98868640efe1683b26627cf4098185c71 | |
parent | 13cdd814ea0e8ef165ab54802f9f102b8b690df7 [diff] |
os: fix handling of ErrShortWrite in (*File).Write Restore the handling of io.ErrShortWrite in (*File).Write: if we write less than the requested amount, and there is no error from the syscall, then return io.ErrShortWrite. I can't figure out how to write a test for this. It would require a non-pollable file (not a pipe) on a device that is almost but not quite entirely full. The original code (https://golang.org/cl/36800043, committed as part of https://golang.org/cl/36930044) does not have a test. Fixes #20386. Change-Id: Ied7b411e621e1eaf49f864f8db90069f276256f5 Reviewed-on: https://go-review.googlesource.com/43558 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project does not use GitHub pull requests, and that we use the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.