summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-05-30 15:53:35 +0200
committerDylan William Hardison <dylan@hardison.net>2017-05-30 15:55:52 +0200
commit82ea853bda02a808ea917a19ef0281efacf9fc82 (patch)
tree1b8507e7e22c16bf630bb282c3501aaf15b4e4d5 /Bugzilla/Install
parent3913ef5f5d5988f8e344921534b8f1db1c51da13 (diff)
downloadbugzilla-82ea853bda02a808ea917a19ef0281efacf9fc82.tar.gz
bugzilla-82ea853bda02a808ea917a19ef0281efacf9fc82.tar.xz
Also truncate the file when writing it out.
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Filesystem.pm2
1 files changed, 1 insertions, 1 deletions
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') {