|
|
@@ -286,7 +286,6 @@ class Folder
|
|
|
if (empty($path)) {
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
return $path[0] === '/' ||
|
|
|
preg_match('/^[A-Z]:\\\\/i', $path) ||
|
|
|
substr($path, 0, 2) === '\\\\' ||
|
|
|
@@ -827,13 +826,13 @@ class Folder
|
|
|
*/
|
|
|
public function realpath($path)
|
|
|
{
|
|
|
- $path = str_replace('/', DIRECTORY_SEPARATOR, trim($path));
|
|
|
if (strpos($path, '..') === false) {
|
|
|
if (!Folder::isAbsolute($path)) {
|
|
|
$path = Folder::addPathElement($this->path, $path);
|
|
|
}
|
|
|
return $path;
|
|
|
}
|
|
|
+ $path = str_replace('/', DIRECTORY_SEPARATOR, trim($path));
|
|
|
$parts = explode(DIRECTORY_SEPARATOR, $path);
|
|
|
$newparts = [];
|
|
|
$newpath = '';
|