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

[CMS PR 25559] Handle files which have been renamed only #61

Conversation

richard67
Copy link

Pull Request for joomla#25559 .

Summary of Changes

Files which have been renamed only shall not be in the list of files to be deleted.

A separate list shall be created for these instead, containing both the old and the new full path.

Renamed means they have base name with different upper or lower case, but everything else is the same, i.e. the directory is the same, case-sensitive.

In the same way as it is with the already existing lists, it can be that from one release to the other a file is renamed from "A" to "a", and then later again from "a" to "A".

Currently this happens when comparing 4.0 Beta 1 with 3.10 last nightly, which results in the rename like this:

'/libraries/src/Filesystem/Support/StringController.php' => '/libraries/src/Filesystem/Support/Stringcontroller.php'

And later when comparing 4.0 Beta 7 with Beta 6, we get:

'/libraries/src/Filesystem/Support/Stringcontroller.php' => '/libraries/src/Filesystem/Support/StringController.php'

But this can also happen with the list of deleted files when a file has been deleted and later is added back: It has to be checked with the previous release's comparion.

@richard67 richard67 requested a review from wilsonge as a code owner April 7, 2021 15:52
@richard67
Copy link
Author

This will work for sure on Linux and Windows, but it might not work for iOS where it would need a real scandir because even realpath or glob don't return the real casing in all cases, see the experiment I had with fixFilenameCasing until I found a way.

@wilsonge wilsonge merged commit 5822081 into wilsonge:deleted_file_rework Apr 20, 2021
@richard67 richard67 deleted the 4.0-dev-wilsonge-deleted_file_rework-mod-2021-04-07_2 branch April 20, 2021 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants