From 82ea853bda02a808ea917a19ef0281efacf9fc82 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 30 May 2017 09:53:35 -0400 Subject: Also truncate the file when writing it out. --- Bugzilla/Install/Filesystem.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index 79eeca98e..22ec34a95 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -690,7 +690,7 @@ sub _create_files { my $info = $files{$file}; if ($info->{overwrite} or not -f $file) { print "Creating $file...\n"; - my $fh = IO::File->new( $file, O_WRONLY | O_CREAT, $info->{perms} ) + my $fh = IO::File->new( $file, O_WRONLY | O_CREAT | O_TRUNC, $info->{perms} ) or die "unable to write $file: $!"; my $contents = $info->{contents}; if (defined $contents && ref($contents) eq 'CODE') { -- cgit v1.2.3-24-g4f1b