From 356bfe73b9b25c9cdf86dd9e125f411824db74fc Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 19 Apr 2017 09:50:38 -0400 Subject: Bug 1357809 - Add endpoints for future cloud-services integration --- Bugzilla/Install/Filesystem.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index c0bc26262..c67823d7a 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -623,12 +623,12 @@ sub _create_files { # It's not necessary to sort these, but it does make the # output of checksetup.pl look a bit nicer. foreach my $file (sort keys %files) { - unless (-e $file) { + my $info = $files{$file}; + if ($info->{overwrite} or not -f $file) { print "Creating $file...\n"; - my $info = $files{$file}; - my $fh = new IO::File($file, O_WRONLY | O_CREAT, $info->{perms}) - || die $!; - print $fh $info->{contents} if $info->{contents}; + my $fh = IO::File->new( $file, O_WRONLY | O_CREAT, $info->{perms} ) + or die "unable to write $file: $!"; + print $fh $info->{contents} if exists $info->{contents}; $fh->close; } } -- cgit v1.2.3-24-g4f1b