From f79d6ba1ebdd17a6d9e6e64f58ab05c898463d62 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Wed, 15 Oct 2008 23:38:30 +0200 Subject: only check if phpfspot SQLite database is writeable, if the file really exists Signed-off-by: Andreas Unterkircher --- phpfspot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpfspot.class.php b/phpfspot.class.php index 9b24d3b..edfed95 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -189,7 +189,7 @@ class PHPFSPOT { } /* Check if database file is writeable */ - if(!is_writeable($this->cfg->phpfspot_db)) { + if(file_exists($this->cfg->phpfspot_db) && !is_writeable($this->cfg->phpfspot_db)) { print "Error: ". $this->cfg->phpfspot_db ." is not writeable for user ". $this->getuid() .".\n"; print "Please fix permissions so phpfspot can create its own sqlite database to store some settings.\n"; exit(1); -- cgit v1.2.3-18-g5258