Fix bug #21280. Thanks to John Darrington for review.
authorBen Pfaff <blp@gnu.org>
Tue, 9 Oct 2007 03:50:20 +0000 (03:50 +0000)
committerBen Pfaff <blp@gnu.org>
Tue, 9 Oct 2007 03:50:20 +0000 (03:50 +0000)
commite1fb96f07a06f3133f54702ed8706493989789fe
tree13b2a2133491ee4c1a4395f313bad67e71e3eac6
parenta0f88151da33f2537632898156c32a7009178d50
Fix bug #21280.  Thanks to John Darrington for review.

* automake.mk: Add new file.

* bugs/overwrite-input-file.sh: New test.

* file-name.c (create_stream): New function.

* por-file-writer.c (pfm_open_writer): Use fh_open to open the
file handle before creating the file, to ensure that we don't
truncate a file that we're reading.  Make code easier to read by
using create_stream.
src/data/ChangeLog
src/data/file-name.c
src/data/file-name.h
src/data/por-file-writer.c
src/data/sys-file-writer.c
tests/ChangeLog
tests/automake.mk
tests/bugs/overwrite-input-file.sh [new file with mode: 0755]