Bug #29777
Removal of symlinked package resources fails
Status: | Resolved | Start date: | 2011-09-14 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Utility | |||
Target version: | TYPO3 Flow Base Distribution - 1.0.0 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
The File System Resource Publisher removes invalid directories or symbolic links from the _Resources/Static/Packages/ folder. This rarely happens, but it does happen if some package providing static resources is deactivated.
In that case FLOW3 failed to remove the symbolic link because the removeDirectoriesRecursively() function did not consider symlinks (only directories).
For reproducing this bug, use a TYPO3 Phoenix installation and let the TYPO3.ExtJS symlink in _Resources/Static/Packages/ point to some invalid directory. On the next web hit, FLOW3 should crash.
Associated revisions
[BUGFIX] Invalid static resource symlinks are removed again
Whenever the resource publishing of FLOW3 finds an invalid
symbolic link in the static resources directory, it should
remove that link and re-publish the resources of the package
in question.
Because Utility\Files::removeDirectoryRecursively() could
not cope with symbolic links, this auto-cleanup failed.
This change set makes removeDirectoryRecursively() and
emptyDirectoryRecursively() symlink aware and sets its
behavior to not follow links but remove the links instead.
Change-Id: I2d5c544e6db728594209294cfe779b8bad3c6d59
Fixes: #29777
[BUGFIX] Invalid static resource symlinks are removed again
Whenever the resource publishing of FLOW3 finds an invalid
symbolic link in the static resources directory, it should
remove that link and re-publish the resources of the package
in question.
Because Utility\Files::removeDirectoryRecursively() could
not cope with symbolic links, this auto-cleanup failed.
This change set makes removeDirectoryRecursively() and
emptyDirectoryRecursively() symlink aware and sets its
behavior to not follow links but remove the links instead.
Note: change set I2d5c544e6db728594209294cfe779b8bad3c6d59
did not completely fix the issue. If the old symbolic link
pointed to nowhere, the publishStaticResources() method
failed.
Change-Id: I30a27d60a93de8aeb7d27ea8030df6748d4af4aa
Fixes: #29777
History
#1 Updated by Mr. Hudson almost 4 years ago
- Status changed from Accepted to Under Review
Patch set 1 of change I2d5c544e6db728594209294cfe779b8bad3c6d59 has been pushed to the review server.
It is available at http://review.typo3.org/4970
#2 Updated by Mr. Hudson almost 4 years ago
Patch set 2 of change I2d5c544e6db728594209294cfe779b8bad3c6d59 has been pushed to the review server.
It is available at http://review.typo3.org/4970
#3 Updated by Robert Lemke almost 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset af9ac039850c0371d60d4e3d065d0dfc29af5795.