mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
Api: Log an error if the thumbnail cache directory does not exist and cannot be created
This commit is contained in:
parent
d013249851
commit
cc06432951
@ -150,6 +150,10 @@ function read_thumbnail($src)
|
||||
}
|
||||
$dst = gen_dstfile($stat && !empty($stat['url']) ? $stat['url'] : $src, $maxsize, $height, $width, $minsize);
|
||||
$dst_dir = dirname($dst);
|
||||
if(!file_exists($dst_dir) && !mkdir($dst_dir, 0700, true))
|
||||
{
|
||||
error_log(__FILE__ . " Unable to cache thumbnail. Check $dst_dir exists and web server has write access.");
|
||||
}
|
||||
if(file_exists($dst_dir))
|
||||
{
|
||||
// Check whether the destination file already exists and is newer than
|
||||
|
Loading…
Reference in New Issue
Block a user