Skip to content

Commit

Permalink
Fix opening folders in file picker (#209330)
Browse files Browse the repository at this point in the history
Part of #208937
  • Loading branch information
alexr00 authored Apr 2, 2024
1 parent a163748 commit fba040a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ export class SimpleFileDialog implements ISimpleFileDialog {
} else {
const newFolderIsOldFolder = resources.extUriIgnorePathCase.isEqual(this.currentFolder, valueUri);
const newFolderIsSubFolder = resources.extUriIgnorePathCase.isEqual(this.currentFolder, resources.dirname(valueUri));
const newFolderIsParent = !newFolderIsOldFolder && resources.extUriIgnorePathCase.isEqualOrParent(this.currentFolder, resources.dirname(valueUri));
const newFolderIsUnrelated = !newFolderIsOldFolder && !newFolderIsParent && !newFolderIsSubFolder;
if (this.endsWithSlash(value) || newFolderIsParent || newFolderIsUnrelated) {
const newFolderIsParent = resources.extUriIgnorePathCase.isEqualOrParent(this.currentFolder, resources.dirname(valueUri));
const newFolderIsUnrelated = !newFolderIsParent && !newFolderIsSubFolder;
if (!newFolderIsOldFolder && (this.endsWithSlash(value) || newFolderIsParent || newFolderIsUnrelated)) {
let stat: IFileStatWithPartialMetadata | undefined;
try {
stat = await this.fileService.stat(valueUri);
Expand Down

0 comments on commit fba040a

Please sign in to comment.