ghwikipp: make_offline_archive: FrontPage.html might not exist, as we're in subdirs now.

From 3fb09e9ecf646cbb0465f826cf2faa8560ce59f9 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 21 Jan 2025 14:51:34 -0500
Subject: [PATCH] make_offline_archive: FrontPage.html might not exist, as
 we're in subdirs now.

---
 make_offline_archive.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/make_offline_archive.php b/make_offline_archive.php
index 7fb2a56..8faccc0 100755
--- a/make_offline_archive.php
+++ b/make_offline_archive.php
@@ -124,7 +124,10 @@ function cook_tree_for_offline_html($srcdir, $dstdir)
     $num_children--;
 }
 
-copy("$tmpoutdir/FrontPage.html", "$tmpoutdir/index.html");  // make a copy, not a rename, in case something references FrontPage explicitly.
+if ( -f "$tmpoutdir/FrontPage.html" ) {
+    copy("$tmpoutdir/FrontPage.html", "$tmpoutdir/index.html");  // make a copy, not a rename, in case something references FrontPage explicitly.
+}
+
 $zipfname = "$outputname.zip";
 $esczipfname = escapeshellarg($zipfname);
 $escoutputname = escapeshellarg($outputname);