]> git.plutz.net Git - flarejs/commitdiff
avoid some error messages
authorPaul Hänsch <paul@plutz.net>
Fri, 7 Feb 2020 05:05:33 +0000 (06:05 +0100)
committerPaul Hänsch <paul@plutz.net>
Fri, 7 Feb 2020 05:05:33 +0000 (06:05 +0100)
index.cgi

index da8c8a82e93837c96168f5ed196f73fb8121fbec..a86bb264b67f9da1df9bdedf7c1c4a938834f9a0 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -15,7 +15,8 @@ if [ "$_PATH" = / ]; then
          <canvas id="view" width=480 height=320 style="border: 1px solid red;"></canvas>
           $(
          for base in mods/fantasycore mods/empyrean_campaign; do
-           find $base/images/avatar $base/images/enemies -name '*.png' |while read -r file; do
+           find $base/images/avatar $base/images/enemies -name '*.png' 2>&-\
+            | while read -r file; do
              file="${file#"${base}/"}"
              printf '<img src="%s" style="display: none;" />' "$file"
             done
@@ -24,6 +25,8 @@ if [ "$_PATH" = / ]; then
          <script type="text/javascript" src="/engine.js"></script>
        </body></html>
        EOF
+elif [ "$_PATH" = /favicon.ico ]; then
+  printf 'Status: 404 Not Found\r\nContent-Length: 0\r\n\r\n'
 else
   for base in . \
               ./mods/empyrean_campaign \