Part of the EllisLab Network

Bug Report

DB_cache.php write function wrting wrong file name “default.index”

Date: 06/16/2008 Severity: Trivial
Status: New Reporter: JimBob123
Version: 1.6.2
Keywords: Libraries, Database Class
Forum Thread: http://codeigniter.com/forums/viewthread/53921/

Description

The “write” function of class “CI_DB_Cache” is writing a wrong directory name “default.index” instead of “default+index” so the “delete” function of the same class cannot delete the files in this directory.

Code Sample

$uri = ($this->CI->uri->segment(1) == FALSE) ? 'default+' : $this->CI->uri->segment(1).'+';

instead of

$uri
= ($this->CI->uri->segment(1) == FALSE) ? 'default.' : $this->CI->uri->segment(1).'+';

will fix this issue

Expected Result

“default+index” cache directory created and files in this directory deleted by “delete” function

Actual Result

“default.index” cache directory created and files in this directory not deleted as delete function is looking for “default+index”

Comment on Bug Report

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?