Tentative fix for *nix
parent
4517a2e51e
commit
a19695cdcb
|
@ -61,12 +61,12 @@ class Filesystem
|
||||||
$from = rtrim(strtr($from, '\\', '/'), '/');
|
$from = rtrim(strtr($from, '\\', '/'), '/');
|
||||||
$to = rtrim(strtr($to, '\\', '/'), '/');
|
$to = rtrim(strtr($to, '\\', '/'), '/');
|
||||||
|
|
||||||
$commonPath = dirname($to);
|
$commonPath = strtr(dirname($to), '\\', '/');
|
||||||
while (strpos($from, $commonPath) !== 0 && '/' !== $commonPath && !preg_match('{^[a-z]:/$}i', $commonPath)) {
|
while (strpos($from, $commonPath) !== 0 && '/' !== $commonPath && !preg_match('{^[a-z]:/?$}i', $commonPath) && '.' !== $commonPath) {
|
||||||
$commonPath = strtr(dirname($commonPath), '\\', '/');
|
$commonPath = strtr(dirname($commonPath), '\\', '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 !== strpos($from, $commonPath) || '/' === $commonPath) {
|
if (0 !== strpos($from, $commonPath) || '/' === $commonPath || '.' === $commonPath) {
|
||||||
return $to;
|
return $to;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue