From: Andreas Unterkircher Date: Sun, 20 Jan 2008 15:52:59 +0000 (+0100) Subject: Merge branch 'devel' X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=commitdiff_plain;h=7e6df6ed675904f2a5a208cb23d771fee43f0bb6;hp=c0c134e5d232d5ec11e367b053972d87a0402216 Merge branch 'devel' --- diff --git a/phpfspot.class.php b/phpfspot.class.php index b4d8b17..088e74d 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -88,6 +88,11 @@ class PHPFSPOT { exit(1); } + if(!is_writeable($this->cfg->thumb_path)) { + print $this->cfg->thumb_path .": directory is not writeable for user ". $this->getuid() ."\n"; + exit(1); + } + $this->cfg_db = new PHPFSPOT_DB($this, $this->cfg->phpfspot_db); if(!is_writeable($this->cfg->phpfspot_db)) { print $this->cfg->phpfspot_db ." is not writeable for user ". $this->getuid() ."\n"; @@ -1377,6 +1382,7 @@ class PHPFSPOT { $thumb_sub_path = substr($file_md5, 0, 2); $thumb_path = $this->cfg->thumb_path ."/". $thumb_sub_path ."/". $resolution ."_". $file_md5; + /* if thumbnail-subdirectory does not exist yet, create it */ if(!file_exists(dirname($thumb_path))) { mkdir(dirname($thumb_path), 0755); }