Show
Ignore:
Timestamp:
04/04/2008 03:21:54 PM (8 months ago)
Author:
Shadowhand
Message:

Fixing a bug in Cache_Sqlite with realpath()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Cache/Sqlite.php

    r2007 r2424  
    3232        public function __construct($filename) 
    3333        { 
    34                 // Find the real path to the directory 
    35                 $filename = str_replace('\\', '/', realpath($filename)); 
    36  
    37                 // Get the filename from the directory 
    38                 $directory = substr($filename, 0, strrpos($filename, '/') + 1); 
     34                // Get the directory name 
     35                $directory = str_replace('\\', '/', realpath(pathinfo($filename, PATHINFO_DIRNAME))).'/'; 
     36 
     37                // Set the filename from the real directory path 
     38                $filename = $directory.basename($filename); 
    3939 
    4040                // Make sure the cache directory is writable