Skip to content

Do not allow workspace folders with scheme different than the current…#75273

Merged
isidorn merged 2 commits intomasterfrom
isidorn/workspaceRemoteLimit
Jun 12, 2019
Merged

Do not allow workspace folders with scheme different than the current…#75273
isidorn merged 2 commits intomasterfrom
isidorn/workspaceRemoteLimit

Conversation

@isidorn
Copy link
Copy Markdown
Collaborator

@isidorn isidorn commented Jun 11, 2019

Fixes https://github.com/microsoft/vscode-remote/issues/1608

I simply put the check in the doAddFolder of the worksapceEditingService. That if in the remote context we do not allow to add new folders which bring a new scheme to the story. The newly added folder must have a scheme which is already known.

Let me know what you think and I can change that.
Maybe we should make it more explicit that when this.environmentService.configuration.remoteAuthority there is already one folder

@isidorn isidorn added this to the June 2019 milestone Jun 11, 2019
@isidorn isidorn requested a review from sandy081 June 11, 2019 14:12
@sandy081
Copy link
Copy Markdown
Member

  • Does the operation should fail in this case? Otherwise there will be no feedback at all.
  • What happens if user adds a folder by editing the file?

@isidorn
Copy link
Copy Markdown
Collaborator Author

isidorn commented Jun 11, 2019

  1. Good point -> I should throw some error / notification so the user gets feedback
  2. I hoped that also goes through this api, did not check. Will do tomorrow

@isidorn
Copy link
Copy Markdown
Collaborator Author

isidorn commented Jun 12, 2019

I have update the PR such that we show a warning when the user tries to drop a folder with a new scheme.
Here's the wording in case you have feedback on how to improve
"Workspace folders from different providers are not allowed in the same workspace."

As for the user editing the file that will be tackled with the explorer decoration provider and will not be a part of this PR.

@isidorn isidorn merged commit 46a9c6d into master Jun 12, 2019
@isidorn isidorn deleted the isidorn/workspaceRemoteLimit branch June 12, 2019 10:37
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants