[FileSystem] explains possible failure of symlink creation in windows

This commit is contained in:
Erik Trapman 2012-06-18 10:34:56 +02:00
parent b1f87440c9
commit 8eca661c20

View File

@ -275,6 +275,12 @@ class Filesystem
if (!$ok) {
if (true !== @symlink($originDir, $targetDir)) {
$report = error_get_last();
if (is_array($report)) {
if (defined('PHP_WINDOWS_VERSION_MAJOR') && false !== strpos($report['message'], 'error code(1314)')) {
throw new IOException('Unable to create symlink due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?');
}
}
throw new IOException(sprintf('Failed to create symbolic link from %s to %s', $originDir, $targetDir));
}
}