Commit 741c74e4 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

Revert "[BUGFIX] Allow symlinked directories in Install Tool"

A link is not a directory.

This reverts commit d28bb427.

Change-Id: I0d8d33bae922a94dbb525e1fd575defcfb95074f
Resolves: #57706
Releases: master
Reviewed-on: http://review.typo3.org/41404


Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent b35fe070
......@@ -258,7 +258,7 @@ class DirectoryNode extends AbstractNode implements NodeInterface {
*/
protected function isDirectory() {
$path = $this->getAbsolutePath();
return (@is_dir($path) || (is_link($path) && @is_dir(@readlink($path))));
return (!@is_link($path) && @is_dir($path));
}
/**
......
......@@ -600,7 +600,7 @@ class DirectoryNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
/**
* @test
*/
public function isDirectoryReturnsTrueIfNameIsALinkToADirectory() {
public function isDirectoryReturnsFalseIfNameIsALinkToADirectory() {
if (TYPO3_OS === 'WIN') {
$this->markTestSkipped('Test not available on Windows OS.');
}
......@@ -614,7 +614,7 @@ class DirectoryNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
mkdir($path . '/' . $dir);
symlink($path . '/' . $dir, $path . '/' . $link);
$node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path . '/' . $link));
$this->assertTrue($node->_call('isDirectory'));
$this->assertFalse($node->_call('isDirectory'));
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment