Skip to content

Added files.simpleDialog.currentDirectory option #225565

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/vs/workbench/contrib/files/browser/files.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ configurationRegistry.registerConfiguration({
'description': nls.localize('files.simpleDialog.enable', "Enables the simple file dialog for opening and saving files and folders. The simple file dialog replaces the system file dialog when enabled."),
'default': false
},
'files.simpleDialog.currentDirectory': {
'type': 'boolean',
'description': nls.localize('files.simpleDialog.currentDirectory', "Open the current directory instead of the parent directory when enabled."),
'default': false
},
'files.participants.timeout': {
type: 'number',
default: 60000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export abstract class AbstractFileDialogService implements IFileDialogService {
return this.preferredHome(schemeFilter);
}

return resources.dirname(candidate);
return this.configurationService.getValue('files.simpleDialog.currentDirectory') ? candidate : resources.dirname(candidate);
}

async preferredHome(schemeFilter = this.getSchemeFilterForWindow()): Promise<URI> {
Expand Down