Browse Source

- Also look in /var/lib/GeoIP/GeoIP.dat for GeoIP database (OpenSuse 11.2)

* Thanks to Mariusz Fik for his report and patch
adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
ed1d75ecb1
  1. 4
      configure
  2. 4
      qcm/geoip-database.qcm
  3. 2
      src/geoip.h

4
configure vendored

@ -461,9 +461,9 @@ public:
return true; return true;
#ifdef Q_WS_X11 #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; 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; return false;
#endif #endif
} }

4
qcm/geoip-database.qcm

@ -20,9 +20,9 @@ public:
return true; return true;
#ifdef Q_WS_X11 #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; 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; return false;
#endif #endif
} }

2
src/geoip.h

@ -50,6 +50,8 @@ protected:
#else #else
if(QFile::exists("/usr/local/share/GeoIP/GeoIP.dat")) if(QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
return "/usr/local/share/GeoIP/"; return "/usr/local/share/GeoIP/";
if(QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
return "/var/lib/GeoIP/";
return "/usr/share/GeoIP/"; return "/usr/share/GeoIP/";
#endif #endif
} }

Loading…
Cancel
Save