1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-16 02:54:33 +02:00

Don't assume all allowDir paths start with "//"

This commit is contained in:
Steve Clay
2015-09-29 11:31:28 -04:00
parent a0d99f5be5
commit 271d8ca5bf

View File

@@ -56,7 +56,9 @@ class Minify_Source_Factory {
// resolve // in allowDirs
$docRoot = $env->getDocRoot();
foreach ($this->options['allowDirs'] as $i => $dir) {
$this->options['allowDirs'][$i] = $docRoot . substr($dir, 1);
if (0 === strpos($dir, '//')) {
$this->options['allowDirs'][$i] = $docRoot . substr($dir, 1);
}
}
if ($this->options['fileChecker'] && !is_callable($this->options['fileChecker'])) {