uw              Wed Mar 28 04:51:33 2001 EDT

  Modified files:              
    /php4/pear/Cache/Container  file.php 
  Log:
  - minor change regarding the recognition of relative file paths
  
  
Index: php4/pear/Cache/Container/file.php
diff -u php4/pear/Cache/Container/file.php:1.9 php4/pear/Cache/Container/file.php:1.10
--- php4/pear/Cache/Container/file.php:1.9      Sat Mar 17 08:07:42 2001
+++ php4/pear/Cache/Container/file.php  Wed Mar 28 04:51:33 2001
@@ -16,7 +16,7 @@
 // |          Sebastian Bergmann <[EMAIL PROTECTED]>               |
 // +----------------------------------------------------------------------+
 //
-// $Id: file.php,v 1.9 2001/03/17 16:07:42 chregu Exp $
+// $Id: file.php,v 1.10 2001/03/28 12:51:33 uw Exp $
 
 require_once 'Cache/Container.php';
 
@@ -24,7 +24,7 @@
 * Stores cache contents in a file.
 *
 * @author   Ulf Wendel  <[EMAIL PROTECTED]>
-* @version  $Id: file.php,v 1.9 2001/03/17 16:07:42 chregu Exp $
+* @version  $Id: file.php,v 1.10 2001/03/28 12:51:33 uw Exp $
 */
 class Cache_Container_file extends Cache_Container {
 
@@ -65,10 +65,10 @@
 
         clearstatcache();
 
-        //make relative paths absolute for use in deconstructor.
+        // make relative paths absolute for use in deconstructor.
         // it looks like the deconstructor has problems with relative paths
-        if (preg_match("/\.+/",$this->cache_dir))
-            $this->cache_dir=realpath(getcwd()."/".$this->cache_dir)."/";
+        if ("." == $this->cache_dir{0})
+            $this->cache_dir = realpath( getcwd() . "/" . $this->cache_dir) . "/";
 
         if (!file_exists($this->cache_dir) || !is_dir($this->cache_dir))
             mkdir($this->cache_dir, 0755);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to