Re: cvs: pear /Cache/Container file.php
| From: | Stig S. Bakken | Date: | Thu, 23 May 2002 21:40:44 +0000 |
| Subject: | Re: cvs: pear /Cache/Container file.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-4062@lists.php.net to get a copy of this message | ||
Actually, if checking a path on Windows that may be specified by a user
(not sure if that applies here), you should check for both
DIRECTORY_SEPARATOR ('\') and '/'. It's possible to mix them in the
same file name. :-P
- Stig
On Thu, 2002-05-23 at 16:16, Tomas V.V.Cox wrote:
> cox Thu May 23 10:16:35 2002 EDT
>
> Modified files:
> /pear/Cache/Container file.php
> Log:
> Use DERECTORY_SEPARATOR instead of '/'
> # Alright now Ulf?
>
>
> Index: pear/Cache/Container/file.php
> diff -u pear/Cache/Container/file.php:1.6 pear/Cache/Container/file.php:1.7
> --- pear/Cache/Container/file.php:1.6 Thu May 23 09:59:23 2002
> +++ pear/Cache/Container/file.php Thu May 23 10:16:32 2002
> @@ -16,7 +16,7 @@
> // | Sebastian Bergmann <sb@sebastian-bergmann.de> |
> // +----------------------------------------------------------------------+
> //
> -// $Id: file.php,v 1.6 2002/05/23 13:59:23 cox Exp $
> +// $Id: file.php,v 1.7 2002/05/23 14:16:32 cox 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.6 2002/05/23 13:59:23 cox Exp $
> +* @version $Id: file.php,v 1.7 2002/05/23 14:16:32 cox Exp $
> */
> class Cache_Container_file extends Cache_Container {
>
> @@ -87,7 +87,7 @@
> $this->cache_dir = realpath( getcwd() . '/' .
> $this->cache_dir) . '/';
>
> // check if a trailing slash is in cache_dir
> - if ($this->cache_dir{strlen($this->cache_dir)-1} != '/')
> + if ($this->cache_dir{strlen($this->cache_dir)-1} != DIRECTORY_SEPARATOR)
> $this->cache_dir .= '/';
>
> if (!file_exists($this->cache_dir) || !is_dir($this->cache_dir))
>
>
>
> --
> PEAR CVS Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php