Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the deleted file list to remove old files after installation #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisgaraffa
Copy link

Overview

Using the deleted files list from civicrm/civicrm-core#28653, the Joomla installers will now remove files from the filesystem that don't exist in the version being installed.

Before

The default Joomla installation process doesn't delete files on upgrade. This leads to outdated files that at best don't do anything and at worst can cause fatal errors.

After

The Joomla installation process now deletes files based on the deleted-files-list.json

@colemanw
Copy link
Member

Cool. I think this will work with the files in the list but not the directories. Directory paths in deleted-files-list.json end in /*.

@chrisgaraffa
Copy link
Author

Cool. I think this will work with the files in the list but not the directories. Directory paths in deleted-files-list.json end in /*.

Oh - missed that! I'll work something up with a DirectoryIterator and rmdir to catch /* at the end of the path and handle properly.

@thoni56
Copy link
Contributor

thoni56 commented Jan 2, 2024

Yes, this would be very valuable!

@elinw
Copy link
Contributor

elinw commented Mar 25, 2024

Hi ,
I was just going through this, and would it make more sense to have the installer delete the civicrm folder during the pre-flight and then when the new civicrm.zip is unzipped it would just have the new files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants