I'm very new to fossil so maybe there's a way to do this already.

After I had committed a PNG to a fossil repository then fossil UI showed the PNG itself instead of just its name. Pretty nice! After adding an ICO, fossil just said it was XXX number of bytes. After looking at the source, I added this patch:

--- doc.c.orig  2017-03-10 11:07:08.000000000 -0600
+++ doc.c       2017-04-17 23:32:03.770418400 -0500
@@ -49,6 +49,7 @@
     { "\211PNG\r\n\032\n",       8, "image/png"  },
     { "\377\332\377",            3, "image/jpeg" },
     { "\377\330\377",            3, "image/jpeg" },
+    { "\0\0\1\0",                4, "image/x-icon" },
   };

   if( !looks_like_binary(pBlob) ) {


Now >my< version of fossil show the ICO file also. (I say this patch is incomplete because definitively identifying an ICO file is more that just looking at the first 4 bytes).

My idea was to have a way to specify the mime type on a per-file basis. Or maybe by file extension like the 'encoding-glob', etc. settings?

Perhaps this is already possible?
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to