Skip to content

Commit

Permalink
Merge pull request doctrine#51 from adammbalogh/master
Browse files Browse the repository at this point in the history
FileCacheReader::saveCacheFile::unlink fix
  • Loading branch information
Ocramius committed Dec 23, 2014
2 parents eeda578 + 8e87c63 commit b5202eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/Common/Annotations/FileCacheReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ private function saveCacheFile($path, $data)
}

if (false === rename($tempfile, $path)) {
@unlink($tempfile);
throw new \RuntimeException(sprintf('Unable to rename %s to %s', $tempfile, $path));
}

@chmod($path, 0666 & ~umask());
@unlink($tempfile);
}

/**
Expand Down

0 comments on commit b5202eb

Please sign in to comment.