-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Delay asking for save location if cannot determine write access #1280
Conversation
This file contains 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
Closing as #1280 overlaps this one and is simpler. |
Closed wrong PR! |
This was referenced Mar 5, 2023
zeebok
approved these changes
Mar 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code look good! I haven't tested yet but if you feel confident feel free to merge, otherwise I will try to test this as best I can tonight.
Yep what I could test does seem to work! |
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.
Fixes #1272
Fixes #1256
Fixes #1183
FileAttribute.ACCESS_CAN_WRITE
attributes now default to writable on loading so that the infobar does not show. The infobar only shows if creating a backup file for the document fails after actually changing the document.As in master, if the
FileAttribute.ACCESS_CAN_WRITE
attribute can be determined and isfalse
then the infobar shows immediately on loading. It is an open question whether this is desirable or whether the behaviour should be the same for all documents. An unwritable document could be opened only for reading and showing the infobar is a little irritating in that case. Also, a writable document could theoretically became unwritable while it is open and this should be handled. It should be relatively easy to handle that in a separate PR if this PR is accepted.Tests:
<Ctrl>S
or the save button<Ctrl><Shift>S
or the Save As button.In each case the document should remain open and a suitable infobar appears if not already present.
Cancelling the operation should do that and keep the document
Close without saving should allow the operation to proceed and the changes are lost.
Note : Duplicate the tab - works as normal - the duplicate is created as a writable New Document on the local file system.
Repeat the above tests on a local file in a writable folder. No change from master
Repeat the above tests on a local file in an unwritable folder. No change from master
Repeat the remote unwritable tests only with autosave on. On opening no infobar appears until a change is made to the file or a save is forced. Unedited doc can be closed without issue.
With autosave on try to edit and close the document in quick succession in everycase the changes should have been saved when the doc is reopened