Browse Source

avoid double slash

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@174 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.2
Xuefer 15 years ago
parent
commit
9273087b98
  1. 4
      coverager/coverager.php

4
coverager/coverager.php

@ -61,7 +61,9 @@ class XcacheCoverageViewer
$this->path = isset($_GET['path']) ? $_GET['path'] : '';
$this->path = preg_replace('!\.{2,}!', '.', $this->path);
$this->path = preg_replace('![\\\\/]{2,}!', '/', $this->path);
$qsep = preg_quote(DIRECTORY_SEPARATOR, '!');
$this->path = preg_replace("![\\\\$qsep]{2,}!", DIRECTORY_SEPARATOR, $this->path);
$this->path = preg_replace("!$qsep$!", '', $this->path);
if ($this->path == '/') {
$this->path = '';
}

Loading…
Cancel
Save