From 5eb6a120afe05a0267a8aa2cd639fb847c0443ba Mon Sep 17 00:00:00 2001 From: Adrian-Stefan Mares <36161392+adriansmares@users.noreply.github.com> Date: Sun, 8 Nov 2026 17:38:56 +0100 Subject: [PATCH] Load a GeoIP database whose modification time is the epoch (#2604) The newest .mmdb in configs/geoip was picked with mtime > modTime, starting from 0, so a database with an mtime of 0 (as Docker's ADD sets for downloads without Last-Modified) was never loaded and the extension failed with "Could not find GeoIP2 database". Assisted-by: Claude:claude-opus-5-5 --- extensions/geoip/extension.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/geoip/extension.cpp b/extensions/geoip/extension.cpp index c3b42169..889fd300 100644 --- a/extensions/geoip/extension.cpp +++ b/extensions/geoip/extension.cpp @@ -79,7 +79,7 @@ bool GeoIP_Extension::SDK_OnLoad(char *error, size_t maxlength, bool late) { libsys->PathFormat(database, sizeof(database), "%s/%s", m_GeoipDir, name); - if (libsys->FileTime(database, FileTime_LastChange, &mtime) && mtime > modTime) + if (libsys->FileTime(database, FileTime_LastChange, &mtime) && (m_GeoipDb[0] == '\0' || mtime > modTime)) { modTime = mtime; ke::SafeStrcpy(m_GeoipDb, sizeof(m_GeoipDb), database);