cvs: php4 /pear/Cache/Container file.php

From: Date: Wed, 28 Mar 2001 12:51:33 +0000
Subject: cvs: php4 /pear/Cache/Container file.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4875@lists.php.net to get a copy of this message
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 <sb@sebastian-bergmann.de> | // +----------------------------------------------------------------------+ // -// $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 <ulf.wendel@phpdoc.de> -* @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);

« previous php.cvs (#4875) next »