Permalink
Browse files

Don't need to unlink file because file_put_contents will handle that.…

… Also, don't return false after file_put_contents fails in case it creates a zero size file (use the existing "does the data match" check to ensure that the zero size file gets unlinked).
  • Loading branch information...
1 parent 6acd4cb commit cedf2d3d618d4a1f5e970ee061a762343312c1a1 @jrchamp jrchamp committed with Jan 24, 2012
Showing with 0 additions and 4 deletions.
  1. +0 −4 min/lib/Minify/Cache/File.php
@@ -30,12 +30,8 @@ public function store($id, $data)
? LOCK_EX
: null;
$file = $this->_path . '/' . $id;
- if (is_file($file)) {
- @unlink($file);
- }
if (! @file_put_contents($file, $data, $flag)) {
$this->_log("Minify_Cache_File: Write failed to '$file'");
- return false;
}
// write control
if ($data !== $this->fetch($id)) {

0 comments on commit cedf2d3

Please sign in to comment.