1
0
Fork 0

Merge remote-tracking branch 'hason/windows'

pull/2349/head
Jordi Boggiano 2013-10-19 13:11:51 +02:00
commit 17886c3b2e
1 changed files with 4 additions and 4 deletions

View File

@ -223,11 +223,11 @@ class Filesystem
}
$commonPath = $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 = dirname($commonPath);
}
if (0 !== strpos($from, $commonPath) || '/' === $commonPath) {
if (0 !== strpos($from, $commonPath) || '/' === $commonPath || '.' === $commonPath) {
return $to;
}
@ -261,11 +261,11 @@ class Filesystem
}
$commonPath = $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 = dirname($commonPath);
}
if (0 !== strpos($from, $commonPath) || '/' === $commonPath) {
if (0 !== strpos($from, $commonPath) || '/' === $commonPath || '.' === $commonPath) {
return var_export($to, true);
}