summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-04-19 15:50:38 +0200
committerDylan William Hardison <dylan@hardison.net>2017-04-19 21:44:08 +0200
commit356bfe73b9b25c9cdf86dd9e125f411824db74fc (patch)
tree9e8fab91e2acf210a405b351e2e60c4ec6abdc7e /Bugzilla/Install
parentf04f94b31b39d3c93ab8723dc2061b04f9a28863 (diff)
downloadbugzilla-356bfe73b9b25c9cdf86dd9e125f411824db74fc.tar.gz
bugzilla-356bfe73b9b25c9cdf86dd9e125f411824db74fc.tar.xz
Bug 1357809 - Add endpoints for future cloud-services integration
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Filesystem.pm10
1 files changed, 5 insertions, 5 deletions
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;
}
}