Changeset 174 in svn for trunk


Ignore:
Timestamp:
2006-09-17T04:14:51+02:00 (9 years ago)
Author:
Xuefer
Message:

avoid double slash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coverager/coverager.php

    r124 r174  
    6262        $this->path = isset($_GET['path']) ? $_GET['path'] : '';
    6363        $this->path = preg_replace('!\.{2,}!', '.', $this->path);
    64         $this->path = preg_replace('![\\\\/]{2,}!', '/', $this->path);
     64        $qsep = preg_quote(DIRECTORY_SEPARATOR, '!');
     65        $this->path = preg_replace("![\\\\$qsep]{2,}!", DIRECTORY_SEPARATOR, $this->path);
     66        $this->path = preg_replace("!$qsep$!", '', $this->path);
    6567        if ($this->path == '/') {
    6668            $this->path = '';
Note: See TracChangeset for help on using the changeset viewer.