Skip to content

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

Open
chrisgaraffa wants to merge 1 commit intocivicrm:masterfrom
chrisgaraffa:remove_deleted_files
Open

Use the deleted file list to remove old files after installation#72
chrisgaraffa wants to merge 1 commit intocivicrm:masterfrom
chrisgaraffa:remove_deleted_files

Conversation

@chrisgaraffa
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

thoni56 commented Jan 2, 2024

Yes, this would be very valuable!

@elinw
Copy link
Copy Markdown
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?

@webmaster-cses-org-uk
Copy link
Copy Markdown
Contributor

👍 to this, if we can get it over the line. Yes please!

The upgrade process is complicated enough as it is, without having to manually delete the civicrm directory every time!

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.

6 participants