fix: regression with updating read-only config#44039
Merged
Altahrim merged 1 commit intonextcloud:masterfrom Apr 18, 2024
Merged
fix: regression with updating read-only config#44039Altahrim merged 1 commit intonextcloud:masterfrom
Altahrim merged 1 commit intonextcloud:masterfrom
Conversation
mejo-
approved these changes
Mar 7, 2024
Contributor
Author
|
Updated the commit message, I don't think the other failures are related to my change (maybe my fork was old though, so I've rebased). |
Contributor
Author
|
Any chance of getting this in for 29? |
come-nc
approved these changes
Apr 2, 2024
Contributor
|
/backport to stable29 |
Contributor
|
/backport to stable28 |
Contributor
|
/backport to stable27 |
Contributor
Author
|
Looks like something got stuck on the CI, so this still hasn't merged yet.. |
2ed85ea to
e746156
Compare
Member
|
I guess the cypress tests fail due to the parent branch living in a forked repository. |
Signed-off-by: Sam Bull <git@sambull.org>
Contributor
Author
Looks like my previous PRs were merged with these failing, so I'm guessing that making them required checks is probably not the right option while it doesn't work in forks. |
This was referenced Apr 18, 2024
Merged
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.
Revert some changes for #29901.
Old behaviour before those changes (and again, after this PR):
Nextcloud calls set('theme', '') etc. Because the existing config has the same values, it does not attempt to write anything to the config file. If the config file would get changed, then it gives an error if the read-only option is set.
Regression behaviour:
The same call is made and immediately errors despite the fact that the config file will not be changed.
The set()/delete() methods are clearly written in a way that they skip writing changes if the value is already the same, but the previous changes make a check before those checks, thus erroring when there are no changes to write. The same PR also adds this check to writeData(), which is called by both of these methods, making them redundant.