Directory with files and symlinks causes problems #450
Answered
by
markseuffert
markseuffert
asked this question in
Report a bug
-
There was a bug in handling a directory with files and symlinks. The old code removed the target of the symlink, not the symlink itself. See also #99. Here's the new code that we're using in the core: $iterator = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS);
$files = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST);
foreach ($files as $file) {
if ($file->getType()=="dir") {
@rmdir($file->getPathname());
} else {
@unlink($file->getPathname());
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
markseuffert
Mar 9, 2021
Replies: 1 comment
-
This has been fixed a while ago. The latest version handles symlinks as expected. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
markseuffert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This has been fixed a while ago. The latest version handles symlinks as expected.