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