diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2007-07-15 08:37:02 +0000 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2007-07-15 08:37:02 +0000 |
commit | 22ac9327fb70b59796a6e5405e18788e89af4d69 (patch) | |
tree | 9ac5e9c8ed522b83240458c206410e05ebb1c72e /phpfspot.class.php | |
parent | 2b68f1944dc095b4252a66b3a0dd64b5650d9d7a (diff) |
check if directory of phpfspot.db is writeable
git-svn-id: file:///var/lib/svn/phpfspot/trunk@205 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r-- | phpfspot.class.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php index 4cdf303..ba94884 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -23,6 +23,12 @@ class PHPFSPOT { $this->cfg = new PHPFSPOT_CFG; $this->db = new PHPFSPOT_DB(&$this, $this->cfg->fspot_db); + + if(!is_writeable(dirname($this->cfg->phpfspot_db))) { + print dirname($this->cfg->phpfspot_db) .": directory is not writeable!"; + exit(1); + } + $this->cfg_db = new PHPFSPOT_DB(&$this, $this->cfg->phpfspot_db); $this->check_config_table(); |