gemini-search

A simple search engine for Geminispace
git clone git://git.laack.co/gemini-search.git
Log | Files | Refs | README

commit a9c4bd80a3bfdbb0063d610d5c2ef8311dc092c4
parent 0a2d98a36105aa8bbd107ba783c492ca3f4b4d4d
Author: Andrew Laack <andrew@laack.co>
Date:   Wed,  6 May 2026 12:36:31 -0500

Updated file naming

Diffstat:
Mcrawl/main.go | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/crawl/main.go b/crawl/main.go @@ -144,7 +144,7 @@ func setupDB(dir string, filename string) *sql.DB { } db.Exec("PRAGMA journal_mode=WAL;") - db.Exec("PRAGMA busy_timeout=1000;") + db.Exec("PRAGMA busy_timeout=2000;") // :( is it so soon the migration to postgresql is initiated? db.Exec("PRAGMA synchronous=NORMAL;") return db @@ -177,8 +177,15 @@ func writeSiteOutput(outputDir string, body string, currentUrl string) (string, return "", errors.New("Must use absolute paths.") } + // This sometimes seems to include a leading '/' so drop that, no need, directory + // hierarchy gives this information to us on the fs. + filename := u.EscapedPath() + if len(filename) > 1 && filename[0] == '/' { + filename = filename[1:] + } + dirname := u.Host // include subdomains if missingFilename(filename) {