From ed1d75ecb1af0635e298128fbe8d757ced7d8f50 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 8 Dec 2009 07:55:08 +0000 Subject: [PATCH] - Also look in /var/lib/GeoIP/GeoIP.dat for GeoIP database (OpenSuse 11.2) * Thanks to Mariusz Fik for his report and patch --- configure | 4 ++-- qcm/geoip-database.qcm | 4 ++-- src/geoip.h | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 82630eabf..698423dff 100755 --- a/configure +++ b/configure @@ -461,9 +461,9 @@ public: return true; #ifdef Q_WS_X11 } - if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat")) + if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat") || QFile::exists("/var/lib/GeoIP/GeoIP.dat")) return true; - printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat\nCountry resolution will be slow."); + printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat or /var/lib/GeoIP/GeoIP.dat\nCountry resolution will be slow."); return false; #endif } diff --git a/qcm/geoip-database.qcm b/qcm/geoip-database.qcm index 30c43e63c..f5fb0854d 100644 --- a/qcm/geoip-database.qcm +++ b/qcm/geoip-database.qcm @@ -20,9 +20,9 @@ public: return true; #ifdef Q_WS_X11 } - if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat")) + if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat") || QFile::exists("/var/lib/GeoIP/GeoIP.dat")) return true; - printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat\nCountry resolution will be slow."); + printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat or /var/lib/GeoIP/GeoIP.dat\nCountry resolution will be slow."); return false; #endif } diff --git a/src/geoip.h b/src/geoip.h index 4c2712d26..ccd6533da 100644 --- a/src/geoip.h +++ b/src/geoip.h @@ -50,6 +50,8 @@ protected: #else if(QFile::exists("/usr/local/share/GeoIP/GeoIP.dat")) return "/usr/local/share/GeoIP/"; + if(QFile::exists("/var/lib/GeoIP/GeoIP.dat")) + return "/var/lib/GeoIP/"; return "/usr/share/GeoIP/"; #endif }