Silence file ops.

git-svn-id: https://develop.svn.wordpress.org/trunk@3113 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-11-16 23:40:14 +00:00
parent b27225b0ca
commit 753dbd7183

View File

@ -199,13 +199,13 @@ class WP_Object_Cache {
foreach (split('/', $group_dir) as $subdir) { foreach (split('/', $group_dir) as $subdir) {
$make_dir .= "$subdir/"; $make_dir .= "$subdir/";
if (!file_exists($this->cache_dir.$make_dir)) { if (!file_exists($this->cache_dir.$make_dir)) {
if (!mkdir($this->cache_dir.$make_dir)) if (! @ mkdir($this->cache_dir.$make_dir))
break; break;
@ chmod($this->cache_dir.$make_dir, $perms); @ chmod($this->cache_dir.$make_dir, $perms);
} }
if (!file_exists($this->cache_dir.$make_dir."index.php")) { if (!file_exists($this->cache_dir.$make_dir."index.php")) {
touch($this->cache_dir.$make_dir."index.php"); @ touch($this->cache_dir.$make_dir."index.php");
} }
} }
@ -278,7 +278,7 @@ class WP_Object_Cache {
} }
if (!file_exists($this->cache_dir."index.php")) { if (!file_exists($this->cache_dir."index.php")) {
touch($this->cache_dir."index.php"); @ touch($this->cache_dir."index.php");
} }
// Acquire a write lock. Semaphore preferred. Fallback to flock. // Acquire a write lock. Semaphore preferred. Fallback to flock.
@ -313,8 +313,8 @@ class WP_Object_Cache {
fputs($fd, $serial); fputs($fd, $serial);
fclose($fd); fclose($fd);
if (!@ rename($temp_file, $cache_file)) { if (!@ rename($temp_file, $cache_file)) {
if (copy($temp_file, $cache_file)) { if (@ copy($temp_file, $cache_file)) {
unlink($temp_file); @ unlink($temp_file);
} }
} }
} }