From: Sebastien SAUVAGE Date: Wed, 27 Feb 2013 20:24:41 +0000 (+0100) Subject: Corrected thumbnail creation. X-Git-Tag: v0.0.41beta~16 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=9e8209064db1e06b99b98ff3309d368d110b22b3 Corrected thumbnail creation. Because some systems do not allow file overwriting when doing a rename(). --- diff --git a/index.php b/index.php index 1ac5187b..4068272c 100644 --- a/index.php +++ b/index.php @@ -2336,6 +2336,7 @@ function resizeImage($filepath) imagejpeg($im2, $tempname, 90); imagedestroy($im); imagedestroy($im2); + unlink($filepath); rename($tempname,$filepath); // Overwrite original picture with thumbnail. return true; }