summaryrefslogtreecommitdiffstats
path: root/phpfspot_img.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpfspot_img.php')
-rw-r--r--phpfspot_img.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/phpfspot_img.php b/phpfspot_img.php
index 60c06b0..e3b0852 100644
--- a/phpfspot_img.php
+++ b/phpfspot_img.php
@@ -32,6 +32,13 @@ class PHPFSPOT_IMG {
$fullpath = $this->parent->translate_path($details['directory_path']) ."/thumbs/". $width ."_". $details['name'];
}
+ if(!file_exists($fullpath)) {
+ $this->parent->gen_thumb($idx, 0, 1);
+ }
+ if(!is_readable($fullpath)) {
+ die("File ". $fullpath ." is not readable. Check the permissions");
+ }
+
$tmp = getimagesize($fullpath);
$mime = $tmp['mime'];