Skip to content
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

Allow WorkspacePaths to be empty if we're not in a workspace #2096

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

andyleejordan
Copy link
Member

We were previously adding the initial working directory as a fallback if there was no workspace. However, this led to new VS Code windows (not in a workspace) enumerating all files in the home directory (if that's what the client had to default to, without a workspace folder). And this could even spam permission requests on more secure systems such as macOS. So we just need to let be an empty enumerable.

This may resolve PowerShell/vscode-powershell#4814 and PowerShell/vscode-powershell#4821. Bug was introduced in #1995.

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

We were previously adding the initial working directory as a fallback if
there was no workspace. However, this led to new VS Code windows (not in
a workspace) enumerating all files in the home directory (if that's what
the client had to default to, without a workspace folder). And this
could even spam permission requests on more secure systems such as
macOS. So we just need to let be an empty enumerable.
@andyleejordan andyleejordan added this pull request to the merge queue Nov 10, 2023
Merged via the queue into main with commit 0fa5751 Nov 10, 2023
13 checks passed
@andyleejordan andyleejordan deleted the andyleejordan/workspace-paths branch November 10, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Engine Issue-Bug A bug to squash.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Opening the home folder on macOS generates prompt to allow access to iCloud Drive, Reminders etc.
2 participants