summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-12-15 13:32:40 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-12-15 13:32:40 +0000
commit39507eea2eedc1d05d5467ebd14ea8ed8e7c9032 (patch)
tree9d169c68235237eed224724b0318cdc51c2bd0dc
parentb44a5c35c5978cd6d518fca5d36b8540102e2312 (diff)
issue81, check if f-spot database is writeable
git-svn-id: file:///var/lib/svn/phpfspot/trunk@315 fa6a889d-dae6-447d-9e79-4ba9a3039384
-rw-r--r--phpfspot.class.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index ffd7e7e..e2b24a8 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -54,6 +54,10 @@ class PHPFSPOT {
}
$this->db = new PHPFSPOT_DB($this, $this->cfg->fspot_db);
+ if(!is_writeable($this->cfg->fspot_db)) {
+ print $this->cfg->fspot_db ." is not writeable for user ". $this->getuid() ."\n";
+ exit(1);
+ }
if(!is_writeable(dirname($this->cfg->phpfspot_db))) {
print dirname($this->cfg->phpfspot_db) .": directory is not writeable!";