summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-10-15 23:38:30 +0200
committerAndreas Unterkircher <unki@netshadow.at>2008-10-15 21:47:26 +0200
commitf79d6ba1ebdd17a6d9e6e64f58ab05c898463d62 (patch)
tree3ecae6b2653c22d52ddfb4bbe0a0c0badf07de70 /phpfspot.class.php
parent79362554f81c7d1779b1755ca715874a691392f0 (diff)
only check if phpfspot SQLite database is writeable, if the file really exists
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php2
1 files changed, 1 insertions, 1 deletions
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);