From d12c7e9086fa6968106b9d2145c5e4702fbca353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Mon, 25 Nov 2013 21:16:34 +0100 Subject: [PATCH] Better test for missing metadata.db (also test if it's readable). re #116 --- base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.php b/base.php index 350ca34..a2c31d7 100644 --- a/base.php +++ b/base.php @@ -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 ();