cache based on vfs-url of image not its path which could be a sharing url

This commit is contained in:
Ralf Becker 2015-02-11 11:06:01 +00:00
parent d0afb453a0
commit 8f4c4237ed

View File

@ -134,7 +134,8 @@ function read_thumbnail($src)
// Generate the destination filename and check whether the destination directory
// had been successfully created (the cache class used in gen_dstfile does that).
$dst = gen_dstfile($src, $maxsize, $height, $width, $minsize);
$stat = egw_vfs::stat(egw_vfs::parse_url($src, PHP_URL_PATH));
$dst = gen_dstfile($stat && !empty($stat['url']) ? $stat['url'] : $src, $maxsize, $height, $width, $minsize);
$dst_dir = dirname($dst);
if(file_exists($dst_dir))
{