Merge remote-tracking branch 'hason/windows'

main
Jordi Boggiano 11 years ago
commit 17886c3b2e

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

Loading…
Cancel
Save