-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Different behaviors when open symlink folder in VS Code #74104
Comments
there should be no differences, help wanted to investigate + fix if possible 👍 |
@jdneo I cannot reproduce, here is what I did
|
@bpasero it seems that you are using macos? Could you please try it on Fedora? I can repro it on Fedora 30 |
@jdneo I do not see an issue with that, you are asking Code to open the link and it does. Do you expect to follow the symlink when opening? |
I can reproduce it. And I get the same result while opening files. Step to reproduce:
The issue might happen on macos. |
Hi @bpasero, Sorry for the late reply. I was on vacation before. Regarding the issue, actually, I'm not sure what's the right behavior should be. But the thing I've observed is that the name of the opened folder is not the same on Mac and Linux. Please let me know anything I can help to help you reproduce the issue. |
The right behaviour in VSCode is to not follow the symlink but actually open it as instructed by the user. However this probably also depends on how the file was opened, e.g. from a native dialog or not. @hwhung0111 @jdneo thanks for providing steps, but you are missing to tell me how you actually open the file. Just to give an example, here are various ways how you can open files in VSCode:
|
I see. For me, I'm using |
I also open from File > Open. For me, macos don't have the same behavior even I open the same symlink. |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
Hi @bpasero, Can we re-open this issue? I have several users who have encountered the same problem. It would be great if VS Code can fix this. |
I do not think VSCode can do anything because we get the path from the system dialog and do nothing with it. I suspect platform differences here with the path we get back from the system dialog via Electron. |
this is a disaster, it completely messes up the git panel. |
Hi @jdneo As a workaround you could open the folder from command line: $ code . I got the same behavior described for @bpasero and it is system dialog dependent. My system is using "GtkFileChooserDialog" to open files and directories ... I have a lot o problems with other applications too. I am Using ubuntu 22.04 with gtk4 and I think this is the problem ... gtk4 is not working properly yet. |
The same issue happened on
I'm using vscode tunnel to develop java project. The application could run as formal, but when test, it shows the error. |
I found an interesting thing during duplicating this issue:
Tested project is a simple project built by spring initializr and just add spring web as dependency. There is no error shown when I connect the tunnel from test client 2 (using VS Code), and all things going as normal. However, when I connect the tunnel from test client 1 (using vscode.dev/tunnel/my-tunnel), this issue happened. BTW, the test project wasn't use symlink, but directly opened by:
Hope these info could help someone to figure this out~ @bpasero @jdneo |
Steps to Reproduce:
demo
ln -s demo demolink
demolink
in VS CodeBehavior on MacOS Mojave
The VS Code will open the folder
demo
as the workspace folder.Behavior on Fedora
The VS Code will open the folder
demolink
as the workspace folder.Because of the differences, some APIs calling behavior will become different as well. For example, when calling
workspace.getWorkspaceFolder(uri)
.The text was updated successfully, but these errors were encountered: