Bug #32550

Files::emptyDirectoryRecursively affects targets of symlinks

Added by Bastian Waidelich over 3 years ago. Updated over 3 years ago.

Status:Resolved Start date:2011-12-14
Priority:Must have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:Utility
Target version:TYPO3 Flow Base Distribution - 1.0.2
PHP Version: Complexity:
Has patch:No Affected Flow version:FLOW3 1.0.0

Description

\TYPO3\FLOW3\Utility\Files::removeDirectoryRecursively() fails to properly unlink directory symlinks on Windows. Thus \TYPO3\FLOW3\Utility\Files::emptyDirectoryRecursively() iterates through the target files of a symlinked folder and removes them!

Associated revisions

Revision 0a9a47bb
Added by Bastian Waidelich over 3 years ago

[BUGFIX] Files::emptyDirectoryRecursively affects targets of symlinks

\TYPO3\FLOW3\Utility\Files::removeDirectoryRecursively() fails to
properly unlink directory symlinks on Windows.

Thus \TYPO3\FLOW3\Utility\Files::emptyDirectoryRecursively()
iterates through the target files of a symlinked folder and
removes them!

This change fixes this by introducing a custom unlink() function
that can remove a symlink regardless of it's type (file/directory).

Change-Id: Iad2e358ec8a94fe91dd27eda5737f075f277f2dc
Fixes: #32550
Releases: 1.0, 1.1

Revision a58728dd
Added by Karsten Dambekalns over 3 years ago

[BUGFIX] Reorder code in emptyDirectoryRecursively()

The change in Iad2e358ec8a94fe91dd27eda5737f075f277f2dc did break one
test, after all. This fixes it for me, I hope it works on Windows.

Change-Id: Iadcfe9b6d143e1fa856a3ce93f51888a18bb5e35
Related: #32550
Releases: 1.1

Revision f7cc65f5
Added by Bastian Waidelich over 3 years ago

[BUGFIX] Change code in emptyDirectoryRecursively()

This change reverts Iadcfe9b6d143e1fa856a3ce93f51888a18bb5e35 which
reintruduced the bug explained in #32550. It fixes the issue at hand
by simplifying the code a bit.

Change-Id: I0c2c252a5ef0dc50e2ab352c25f3f9c9d38bb6f6
Fixes: #32550
Releases: 1.1

Revision 12eea665
Added by Bastian Waidelich over 3 years ago

[BUGFIX] Files::emptyDirectoryRecursively affects targets of symlinks

\TYPO3\FLOW3\Utility\Files::removeDirectoryRecursively() fails to
properly unlink directory symlinks on Windows.

Thus \TYPO3\FLOW3\Utility\Files::emptyDirectoryRecursively()
iterates through the target files of a symlinked folder and
removes them!

This change fixes this by introducing a custom unlink() function
that can remove a symlink regardless of it's type (file/directory).

Change-Id: Ia0aef3edf326d89bd87016e6fd654693fed85c02
Fixes: #32550
Releases: 1.0, 1.1

History

#1 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7260

#2 Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7260

#3 Updated by Gerrit Code Review over 3 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7260

#4 Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7260

#5 Updated by Gerrit Code Review over 3 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7260

#6 Updated by Gerrit Code Review over 3 years ago

Patch set 1 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/7293

#7 Updated by Bastian Waidelich over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#8 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7385

#9 Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7385

#10 Updated by Bastian Waidelich over 3 years ago

  • Status changed from Under Review to Resolved

#11 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/7293

#12 Updated by Gerrit Code Review over 3 years ago

Patch set 3 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/7293

#13 Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/7293

#14 Updated by Bastian Waidelich over 3 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF