Fix opening folders in file picker (#209330)

Part of #208937
This commit is contained in:
Alex Ross 2024-04-02 11:12:58 +02:00 committed by GitHub
parent a163748c59
commit fba040af32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);