Skip to content

Commit

Permalink
- Also look in /var/lib/GeoIP/GeoIP.dat for GeoIP database (OpenSuse …
Browse files Browse the repository at this point in the history
…11.2)

  * Thanks to Mariusz Fik for his report and patch
  • Loading branch information
Christophe Dumez committed Dec 8, 2009
1 parent 1e42003 commit ed1d75e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions qcm/geoip-database.qcm
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 2 additions & 0 deletions src/geoip.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class GeoIP {
#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
}
Expand Down

0 comments on commit ed1d75e

Please sign in to comment.