From 1e0a2a08468ae21205374c30f34a6b2309c72593 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Thu, 25 Apr 2002 19:50:47 +0000 Subject: [PATCH] Small fix for mbfile index, empty areas --- mbfido/mbfindex.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mbfido/mbfindex.c b/mbfido/mbfindex.c index 2b0ca975..af1f1595 100644 --- a/mbfido/mbfindex.c +++ b/mbfido/mbfindex.c @@ -509,6 +509,7 @@ void Index(void) } } + MacroVars("efghijklm", "ddsssssds", 0, 0, "", "", "", "", "", 0, ""); MacroVars("e", "d", aTotal); /* * Check if this is a .gif or .jpg file, if so then @@ -556,6 +557,7 @@ void Index(void) fseek(fb, fileptr1, SEEK_SET); MacroRead(fb, fa); aSize += file.Size; + MacroVars("efghijklm", "ddsssssds", 0, 0, "", "", "", "", "", 0, ""); if (file.FileDate > last) last = file.FileDate; if ((aTotal % CFG.www_files_page) == 0) { @@ -565,6 +567,14 @@ void Index(void) } } /* if (!file.deleted) */ } + + if (aTotal == 0) { + /* + * Nothing written, skip skip fileblock + */ + while ((fgets(linebuf, 254, fb) != NULL) && ((linebuf[0]!='@') || (linebuf[1]!='|'))); + } + KSize += aSize / 1024; closepage(fa, area.Path, inArea, aTotal, fb); fclose(fb);