User tests: Successful: Unsuccessful:
Pull Request for Issue #46284.
At the end of the installation process, Joomla attempts to delete the installation folder.
On Windows, this operation consistently throws a FilesystemException
because PHP locks the currently executing index.php
file, preventing its immediate removal.
The exception was not caught, causing a fatal error and breaking the cleanup process.
This PR fixes the issue by wrapping the folder deletion in a try/catch block and returning false when an exception is thrown, instead of letting it crash.
Additionally, a Windows-specific workaround has been added:
if the installation folder contains no subfolders and only the (already deleted but still locked) index.php file, we can assume the deletion was effectively successful and continues the cleanup process.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
PS: I used ChatGTP to improve the PR description and code comment to make it more clear :D. It provides better, clear messages than mine :D
Status | New | ⇒ | Pending |
Category | ⇒ | Installation |
Labels |
Added:
PR-5.4-dev
|
I have tested this item ✅ successfully on 77e58b5
Or get a fresh installation of Joomla 5.4, then replace the file installation/src/Model/CleanupModel.php in the package with the file change in this PR as I wrote in testing instructions. I do not know if there is an easier way to test this.
You cant test this properly with the download in this pr as that still has the dev_status=development and that needs to be manually changed before trying to install