]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Database.class.php
get up to date for merge
[github/wallabag/wallabag.git] / inc / poche / Database.class.php
index 8b52a9df840f8999798161b93ac8aa96bcced8e4..b5dd21203a9a667872303bc71a0b97498f862769 100755 (executable)
@@ -23,6 +23,10 @@ class Database {
     {
         switch (STORAGE) {
             case 'sqlite':
+                // Check if /db is writeable
+                if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {\r
+                       die('An error occured: "db" directory must be writeable for your web server user!');
+                }
                 $db_path = 'sqlite:' . STORAGE_SQLITE;
                 $this->handle = new PDO($db_path);
                 break;