Calc: Fix read-only file opening in edit mode#15568
Open
Darshan-upadhyay1110 wants to merge 1 commit intomainfrom
Open
Calc: Fix read-only file opening in edit mode#15568Darshan-upadhyay1110 wants to merge 1 commit intomainfrom
Darshan-upadhyay1110 wants to merge 1 commit intomainfrom
Conversation
The guard `!this._documentInfo` was intended to call `setPermission` only on the first status message. However, `this._documentInfo` was assigned to `textMsg` one line before the check, causing the guard to always evaluate to false and preventing `setPermission` from ever executing. Move the `_documentInfo` assignment after the read-only check so the guard functions as intended. Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com> Change-Id: Ifc9ba699eb15fb69e74776856142c6a0267f3d03
58ea7ac to
782074b
Compare
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.
The guard
!this._documentInfowas intended to callsetPermissiononly on the first status message. However,this._documentInfowas assigned totextMsgone line before the check, causing the guard to always evaluate to false and preventingsetPermissionfrom ever executing.Move the
_documentInfoassignment after the read-only check so the guard functions as intended.Change-Id: Ifc9ba699eb15fb69e74776856142c6a0267f3d03
Summary
TODO
Checklist
make prettier-writeand formatted the code.make checkmake runand manually verified that everything looks okay