[CMS PR 25559] Handle files which have been renamed only#61
Merged
wilsonge merged 3 commits intowilsonge:deleted_file_reworkfrom Apr 20, 2021
Conversation
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.