diff --git a/packages/00common/src/puzzles.cgi.c b/packages/00common/src/puzzles.cgi.c index a8d6bd9..39403a8 100644 --- a/packages/00common/src/puzzles.cgi.c +++ b/packages/00common/src/puzzles.cgi.c @@ -94,13 +94,13 @@ main(int argc, char *argv[]) opt = opendir(package_path("")); if (NULL == opt) { - cgi_error("Cannot opendir(\"/opt\")"); + cgi_error("Cannot open packages directory"); } cgi_head("Open puzzles"); printf("
\n"); - /* For each file in /opt/ ... */ + /* For each file in /packages/ ... */ while (1) { struct dirent *e = readdir(opt); char *cat; @@ -136,6 +136,11 @@ main(int argc, char *argv[]) read_until_char(map, hash, sizeof(hash), '\n'); points = atol(points_str); + if (0 == points) { + printf(" \n"); + break; + } + printf(" %ld\n", cat, hash, points); if (points > maxpoints) break;