Change:
valueUri = this.root(this.currentFolder); value = this.pathFromUri(valueUri); return await this.updateItems(valueUri, true) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated; <del> } else if (!resources.extUriIgnorePathCase.isEqual(this.currentFolder, valueUri) && (this.endsWithSlash(value) || (!resources.extUriIgnorePathCase.isEqual(this.currentFolder, resources.dirname(valueUri)) && resources.extUriIgnorePathCase.isEqualOrParent(this.currentFolder, resources.dirname(valueUri))))) { let stat: IFileStatWithPartialMetadata | undefined; try { stat = await this.fileService.stat(valueUri); } catch (e) { // do nothing } if (stat && stat.isDirectory && (resources.basename(valueUri) !== '.') && this.endsWithSlash(value)) { valueUri = this.tryAddTrailingSeparatorToDirectory(valueUri, stat); return await this.updateItems(valueUri) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated; } else if (this.endsWithSlash(value)) { // The input box contains a path that doesn't exist on the system. this.filePickBox.validationMessage = nls.localize('remoteFileDialog.badPath', 'The path does not exist.'); // Save this bad path. It can take too long to a stat on every user entered character, but once a user enters a bad path they are likely // to keep typing more bad path. We can compare against this bad path and see if the user entered path starts with it. this.badPath = value; return UpdateResult.InvalidPath; } else { let inputUriDirname = resources.dirname(valueUri); const currentFolderWithoutSep = resources.removeTrailingPathSeparator(resources.addTrailingPathSeparator(this.currentFolder)); const inputUriDirnameWithoutSep = resources.removeTrailingPathSeparator(resources.addTrailingPathSeparator(inputUriDirname)); if (!resources.extUriIgnorePathCase.isEqual(currentFolderWithoutSep, inputUriDirnameWithoutSep) && (!/^[a-zA-Z]:$/.test(this.filePickBox.value) || !equalsIgnoreCase(this.pathFromUri(this.currentFolder).substring(0, this.filePickBox.value.length), this.filePickBox.value))) { let statWithoutTrailing: IFileStatWithPartialMetadata | undefined; try { statWithoutTrailing = await this.fileService.stat(inputUriDirname); } catch (e) { // do nothing } if (statWithoutTrailing && statWithoutTrailing.isDirectory) { this.badPath = undefined; inputUriDirname = this.tryAddTrailingSeparatorToDirectory(inputUriDirname, statWithoutTrailing); return await this.updateItems(inputUriDirname, false, resources.basename(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated; </del> <ins> } 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) { let stat: IFileStatWithPartialMetadata | undefined; try { stat = await this.fileService.stat(valueUri); } catch (e) { // do nothing } if (stat && stat.isDirectory && (resources.basename(valueUri) !== '.') && this.endsWithSlash(value)) { valueUri = this.tryAddTrailingSeparatorToDirectory(valueUri, stat); return await this.updateItems(valueUri) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated; } else if (this.endsWithSlash(value)) { // The input box contains a path that doesn't exist on the system. this.filePickBox.validationMessage = nls.localize('remoteFileDialog.badPath', 'The path does not exist.'); // Save this bad path. It can take too long to a stat on every user entered character, but once a user enters a bad path they are likely // to keep typing more bad path. We can compare against this bad path and see if the user entered path starts with it. this.badPath = value; return UpdateResult.InvalidPath; } else { let inputUriDirname = resources.dirname(valueUri); const currentFolderWithoutSep = resources.removeTrailingPathSeparator(resources.addTrailingPathSeparator(this.currentFolder)); const inputUriDirnameWithoutSep = resources.removeTrailingPathSeparator(resources.addTrailingPathSeparator(inputUriDirname)); if (!resources.extUriIgnorePathCase.isEqual(currentFolderWithoutSep, inputUriDirnameWithoutSep) && (!/^[a-zA-Z]:$/.test(this.filePickBox.value) || !equalsIgnoreCase(this.pathFromUri(this.currentFolder).substring(0, this.filePickBox.value.length), this.filePickBox.value))) { let statWithoutTrailing: IFileStatWithPartialMetadata | undefined; try { statWithoutTrailing = await this.fileService.stat(inputUriDirname); } catch (e) { // do nothing } if (statWithoutTrailing && statWithoutTrailing.isDirectory) { this.badPath = undefined; inputUriDirname = this.tryAddTrailingSeparatorToDirectory(inputUriDirname, statWithoutTrailing); return await this.updateItems(inputUriDirname, false, resources.basename(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated; } </ins> } } }

Discussion:
Type: <bBug</bMotivation: I want to see in my current session the file from another folder to compare it with the local I use to open this file. It succeeds when the is NOT open in the current editor. It silently fail when it is. I suppose the code compare the names instead of comparing the paths. That should be an easy fix. VS Code version: Code - Insiders 1.87.0-insider (Universal) (, 2024-02-09T05:49:05.817Z) OS version: Darwin arm64 23.1.0 Modes: <details<summarySystem Info</summary </detailsExtensions: none<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
It seems it happens around here in the function but there are so many features that I am lost Anyway the workaround is easy. So it not a big issue
/gifPlease
Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, files are preferred as they are displayed inline on GitHub. You may find helpful as a browser-based gif recording tool. If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording ( in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue. Happy coding!
Thx for your help. I have not quite yet figured to correctly use So far, I know how to capture part of a chrome window for the current tab. So, I capture a session within which illustrates the problem. One sees a pickdialog where I paste the name of the file to open. I type return, nothing happens !
In your example the you are still opening the same file, so I am not sure what else you would expect? Maybe the issue here is that the picker does not update when you paste the absolute file path?
I open a file with the same name in a different repo, that is with a different path. If I open a file with a different name than the one of the current editor, it works fine which is an easy work around. Thx for your feedback.

but in your recording, when you enter the path of that other file, the elements below do not seem to be changing, so when you press enter, it opens the as before, can you confirm that theory? The way this dialog works is that it opens the selected file below the input field when you press enter.
As I said "I use open file or folder to open this file. It succeeds when the is NOT open in the current editor. It silently fail when it is." I don't know if "it [re]opens the [current] " or, as I said "it silently fails". As a user, I can only say that the current is left untouched and the file which path i gave in the pick dialog is not opened. If I make the current file in the current editor anything but a , opening a with a different path works fine so the problem is just a minor inconvenience.
Can you give me very exact steps how to reproduce from scratch so that I can try for myself?
Sorry I did not realise that was so hard to replicate. Indeed here, I obtain different results by doing seemingly equivalent stuff. The setup is the following : TMPDIR=~/tmp mkdir $TMPDIR mkdir $TMPDIR/a mkdir $TMPDIR/b echo '{"a": "b"}' $ echo '{"c": "d"}' $ code-insiders $TMPDIR/a Then I interact within vsocde. I get some stuff about trusting folder when I do the described stuff below for the first time. I had cut in advance the path of I use the command open , erase the proposed path, paste, and type ENTER. Nothing happens. Next, from second 14 If I do the same but by a different interaction, it opens correctly. Here is a .mov file of these interactions : I realize, for whatever reason, part of the pasted path is in uppercase. On a mac, that should not make a difference. And I later replicated the same interactions with the path with the correct "case". I don't mind if you close the issue. That does not matter to me. Anyway I hope I help you to replicate.
Thanks, this looks to me like a bug with the simple file dialog not updating its list in this case, still showing the previous contents.