From 6fb9b0fbbdde36e8799555b3af994b48175566c6 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 6 Jun 2016 11:02:43 +0200 Subject: Die when opening output file fails Signed-off-by: Florian Pritz --- generate_gallery.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate_gallery.pl b/generate_gallery.pl index 8373fd2..2ed3215 100755 --- a/generate_gallery.pl +++ b/generate_gallery.pl @@ -83,7 +83,7 @@ for my $dir (@ARGV) { $html .= "\n\n"; } open TEMPLATE, "<", "$opts{template}"; - open OUTPUT, ">", "$abs_dir/index.html"; + open OUTPUT, ">", "$abs_dir/index.html" or die "Failed to open output file: $!"; while (