summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-06-06 11:02:43 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-06-06 11:02:43 +0200
commit6fb9b0fbbdde36e8799555b3af994b48175566c6 (patch)
tree2308c4acd44a267adbd3e9cae55597c7fed93761
parentfe923497feba3d9f276ca490967b91382e2dbfd8 (diff)
downloadgenerate_gallery-6fb9b0fbbdde36e8799555b3af994b48175566c6.tar.gz
generate_gallery-6fb9b0fbbdde36e8799555b3af994b48175566c6.tar.xz
Die when opening output file failsHEADmaster
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xgenerate_gallery.pl2
1 files changed, 1 insertions, 1 deletions
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 .= "</a>\n</div>\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 (<TEMPLATE>) {
if (/%%CONTENT%%/) {
print OUTPUT $html;