[BUGFIX] Fix GeneralUtility::rmdir and usage in tests 95/20095/3
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 22 Apr 2013 21:13:39 +0000 (23:13 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 6 May 2013 18:23:44 +0000 (20:23 +0200)
commit9b19353a31a2b630ae112319c68b66b871fb57b2
treef344a3ed906651b0782619152864f3fcba572e4f
parentda4e4f0e87cf6d39fe8b4e7f5b42433be2ba56dd
[BUGFIX] Fix GeneralUtility::rmdir and usage in tests

rmdir() has some issues fixed by the patch, especially if
feeded with links:
* If target is a dead link, the link was not removed.
* If target is a link to a directory, only the link should be
  removed, but not the directory the link points to.
* If recursion is disabled, but a directory has sub files or
  directories, a warning might be raised, now suppressed
  with an @.

The method is now fully covered by tests and can handle files,
links and directories. It is now used in GeneralUtilityTest
itself to clean up any created file during tearDown, so a lot
of tests can be streamlined.

Fixes: #47459
Releases: 6.2
Change-Id: If58a6c2262165b84c4b674c1ae71fdddcbf56458
Reviewed-on: https://review.typo3.org/20095
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php