Skip to content

Commit

Permalink
Better debugging for DB Cache path
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Gottier committed Nov 14, 2012
1 parent 878c4bd commit 51c0b55
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion system/database/DB_cache.php
Expand Up @@ -95,12 +95,22 @@ public function check_path($path = '')
? rtrim(realpath($path), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR
: rtrim($path, '/').'/';

if ( ! is_dir($path) OR ! is_really_writable($path))
if ( ! is_dir($path))
{
log_message('debug', 'Cache Path Error: '.$path);

// If the path is wrong we'll turn off caching
return $this->db->cache_off();
}

if ( ! is_really_writable($path))
{
log_message('debug', 'Cache Dir Not Writable: '.$path);

// If the path is not really writable we'll turn off caching
return $this->db->cache_off();
}

$this->db->cachedir = $path;
return TRUE;
}
Expand Down

0 comments on commit 51c0b55

Please sign in to comment.