Better test for missing metadata.db (also test if it's readable). re #116

This commit is contained in:
Sébastien Lucas 2013-11-25 21:16:34 +01:00
parent 4d9b3a4925
commit d12c7e9086

View file

@ -899,7 +899,7 @@ abstract class Base
global $config;
if (is_null (self::$db)) {
try {
if (file_exists (self::getDbFileName ($database))) {
if (is_readable (self::getDbFileName ($database))) {
self::$db = new PDO('sqlite:'. self::getDbFileName ($database));
} else {
self::error ();