Permalink
Browse files

[Config] Little tweak

  • Loading branch information...
1 parent a41c035 commit 98939ab266bf2fcb360c3ed0b2defd5636023632 @pborreli pborreli committed Sep 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 ConfigCache.php
View
@@ -99,7 +99,7 @@ public function write($content, array $metadata = null)
throw new \RuntimeException(sprintf('Unable to write in the %s directory', $dir));
}
- $tmpFile = tempnam(dirname($this->file), basename($this->file));
+ $tmpFile = tempnam($dir, basename($this->file));
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $this->file)) {
@chmod($this->file, 0666 & ~umask());
} else {
@@ -108,7 +108,7 @@ public function write($content, array $metadata = null)
if (null !== $metadata && true === $this->debug) {
$file = $this->file.'.meta';
- $tmpFile = tempnam(dirname($file), basename($file));
+ $tmpFile = tempnam($dir, basename($file));
if (false !== @file_put_contents($tmpFile, serialize($metadata)) && @rename($tmpFile, $file)) {
@chmod($file, 0666 & ~umask());
}

0 comments on commit 98939ab

Please sign in to comment.