Delete the cache in tmp even if the copy failed. Props andy. fixes #4141
git-svn-id: https://develop.svn.wordpress.org/trunk@5255 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a1e8f976c3
commit
3c8cb11aee
@ -340,10 +340,9 @@ class WP_Object_Cache {
|
||||
fputs($fd, $serial);
|
||||
fclose($fd);
|
||||
if (!@ rename($temp_file, $cache_file)) {
|
||||
if (@ copy($temp_file, $cache_file))
|
||||
@ unlink($temp_file);
|
||||
else
|
||||
if (!@ copy($temp_file, $cache_file))
|
||||
$errors++;
|
||||
@ unlink($temp_file);
|
||||
}
|
||||
@ chmod($cache_file, $file_perms);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user