summaryrefslogtreecommitdiff
path: root/scripts/dpkg-mergechangelogs.pl
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2011-07-11 13:27:44 +0200
committerRaphaël Hertzog <hertzog@debian.org>2011-07-11 14:04:59 +0200
commit64dc71b84f8a4403028631f8f42e413f378e7d77 (patch)
tree71641e74d6be0f3e3e00863009ffd35b17ac0096 /scripts/dpkg-mergechangelogs.pl
parentd415c388d31e9c4b7eff8b77711a4c15b3b85208 (diff)
downloaddpkg-64dc71b84f8a4403028631f8f42e413f378e7d77.tar.gz
dpkg-mergechangelogs: fail if it cannot close the output file
Made dpkg-mergechangelogs check the return value of close and fail if it was not successful. Previously dpkg-mergechangelogs would silently fail to write a file if (e.g.) the device was full. Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
Diffstat (limited to 'scripts/dpkg-mergechangelogs.pl')
-rwxr-xr-xscripts/dpkg-mergechangelogs.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dpkg-mergechangelogs.pl b/scripts/dpkg-mergechangelogs.pl
index cea758410..9cc84f28c 100755
--- a/scripts/dpkg-mergechangelogs.pl
+++ b/scripts/dpkg-mergechangelogs.pl
@@ -128,7 +128,7 @@ while (1) {
if (defined($out_file) and $out_file ne "-") {
open(OUT, ">", $out_file) || syserr(_g("cannot write %s"), $out_file);
print OUT ((blessed $_) ? "$_" : "$_\n") foreach @result;
- close(OUT);
+ close(OUT) || syserr(_g("cannot write %s"), $out_file);
} else {
print ((blessed $_) ? "$_" : "$_\n") foreach @result;
}