simpleFileDialog: ask user if we should create directory if it doesn't exist when saving#152536
Merged
alexr00 merged 2 commits intoAug 5, 2022
Merged
Conversation
…t exist when saving When saving a file using the SimpleFileDialog (for example, when editing a file over SSH), if the directory doesn't exist, the user currently has to cancel saving, create the directory, then try saving again. This adds a prompt to allow the user to create any missing directories from the save dialog directly. Tested with the TestResolver in Code - OSS. I wasn't able to get the Remote - SSH extension working in Code - OSS, but it should work there, since FileService.writeFile calls mkdirp to create missing folders, so this should work with all remote providers. Fixes microsoft#71425.
Contributor
|
@alexr00 any concern with this PR? |
alexr00
approved these changes
Aug 5, 2022
alexr00
left a comment
Member
There was a problem hiding this comment.
@laurentlb no concerns, I just didn't have a chance to review.
@zhuowei thank you for the PR! Looks good, and I agree that it should work with other remotes.
bpasero
approved these changes
Aug 5, 2022
joyceerhl
pushed a commit
that referenced
this pull request
Aug 10, 2022
…t exist when saving (#152536) When saving a file using the SimpleFileDialog (for example, when editing a file over SSH), if the directory doesn't exist, the user currently has to cancel saving, create the directory, then try saving again. This adds a prompt to allow the user to create any missing directories from the save dialog directly. Tested with the TestResolver in Code - OSS. I wasn't able to get the Remote - SSH extension working in Code - OSS, but it should work there, since FileService.writeFile calls mkdirp to create missing folders, so this should work with all remote providers. Fixes #71425. Co-authored-by: Alex Ross <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When saving a file using the SimpleFileDialog (for example, when editing a file over SSH), if the directory doesn't exist, the user currently has to cancel saving, create the directory, then try saving again.
This adds a prompt to allow the user to create any missing directories from the save dialog directly.
Tested with the TestResolver in Code - OSS.
I wasn't able to get the Remote - SSH extension working in Code - OSS, but it should work there, since FileService.writeFile calls mkdirp to create missing folders, so this should work with all remote providers.
This PR fixes #71425.