microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.5k stars 28.65k forks source link

There is a problem with identifying file path soft links on Windows #196583

Closed Michaelzhouisnotwhite closed 9 months ago

Michaelzhouisnotwhite commented 10 months ago

Type: Bug

Here is a bcd.cpp:

void foo();
void main() {
    foo();
}

Suppose there is a repo named abc on path: C:\Users\Repository\abc. File bcd.cpp is under folder abc. Repository is a symbolic link of C:\Users\Documents\My-Archives\Repository. As I use code C:\Users\Repository\abc to open the workspace and click the function foo. Vscode will open anothor bcd.cpp editor with abs path. It cannot recognize that those two bcd.cpp is the same file.

Example screenshots:

click init function: image

Then anothor file open. The normal way is to jump to the current file.

image

The update file explore button is not worked as well.

image

VS Code version: Code 1.83.1 (f1b07bd25dfad64b0167beb15359ae573aecd2cc, 2023-10-10T23:48:05.904Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i5-13400 (16 x 2496)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.78GB (17.85GB free)| |Process Argv|.\\ogl\\ --crash-reporter-id 3149b09a-a810-48be-b145-2f7adacf212d| |Screen Reader|no| |VM|0%|
Extensions (128) Extension|Author (truncated)|Version ---|---|--- language-x86-64-assembly|13x|3.1.4 json-yaml-schema-selector|74t|1.1.0 codesnap|adp|1.3.4 cppincludeguard|aki|1.7.1 project-manager|ale|12.7.0 icons-carbon|ant|0.2.6 vscode-icontheme-nomo-dark|be5|1.3.6 markdown-mermaid|bie|1.20.0 markdown-preview-github-styles|bie|2.0.3 file-browser|bod|0.2.11 mermaid-markdown-syntax-highlighting|bpr|1.5.3 vsc-jetbrains-icons-enhanced|Bre|2.1.0 vscode-translation|cai|3.0.6 vscode-jetbrains-icon-theme|cha|2.10.1 turbo-console-log|Cha|2.9.6 unicode-converter|cha|0.0.3 npm-intellisense|chr|1.4.5 path-intellisense|chr|2.8.5 gitignore|cod|0.9.0 simple-icons|com|0.1.6 doxdocgen|csc|1.4.0 vscode-eslint|dba|2.4.2 githistory|don|0.6.20 python-extension-pack|don|1.7.0 vscode-html-css|ecm|1.13.1 LogFileHighlighter|emi|2.16.0 vscode-great-icons|emm|2.1.102 prettier-vscode|esb|10.1.0 vue-inline-template|fai|1.0.1 cpp-class-creator|Fle|1.1.0 shell-format|fox|7.2.5 remotehub|Git|0.62.0 mdmath|goe|2.7.4 todo-tree|Gru|0.0.226 cpp-reference|Guy|0.2.3 vscode-drawio|hed|1.6.6 rest-client|hum|0.25.1 output-colorizer|IBM|0.1.2 vscode-jetbrains-keybindings|isu|0.1.9 open-file-from-path|jac|1.3.4 latex-workshop|Jam|9.14.1 vscode-edit-csv|jan|0.8.3 markdown-extended|jeb|1.1.3 cmake-language-support-vscode|jos|0.0.9 intellij-idea-keybindings|k--|1.5.12 vsc-python-indent|Kev|1.18.0 json2csv|kha|0.0.1 vscode-cudacpp|kri|0.1.1 vscode-clangd|llv|0.1.24 rainbow-csv|mec|3.8.0 python-path|mge|0.0.14 vscode-language-babel|mgm|0.0.40 git-graph|mhu|1.30.0 fluent-icons|mig|0.0.18 formate|Mik|1.2.1 JetBrainsIcons|Mos|1.0.5 vscode-docker|ms-|1.27.0 vscode-language-pack-zh-hans|MS-|1.83.2023101109 vscode-dotnet-runtime|ms-|1.8.1 vscode-edge-devtools|ms-|2.1.3 isort|ms-|2023.11.12711013 pylint|ms-|2023.9.12961008 python|ms-|2023.18.0 jupyter|ms-|2023.9.1102792234 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.315.1 remote-ssh|ms-|0.106.5 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.81.8 vscode-remote-extensionpack|ms-|0.24.0 azure-repos|ms-|0.38.0 cmake-tools|ms-|1.15.31 cpptools|ms-|1.18.0 cpptools-extension-pack|ms-|1.3.0 hexeditor|ms-|1.9.12 powershell|ms-|2023.8.0 remote-explorer|ms-|0.4.1 remote-repositories|ms-|0.40.0 remote-server|ms-|1.4.3 test-adapter-converter|ms-|0.1.8 autodocstring|njp|0.6.1 vscode-python-typehint|njq|1.5.1 open-html-in-browser|pea|2.1.10 explorer-exclude|Pet|1.3.2 csv-to-table|php|1.4.0 material-icon-theme|PKi|4.31.0 material-product-icons|PKi|1.7.0 sqlite-viewer|qwt|0.3.13 vscode-yaml|red|1.14.0 c-cpp-definition-generator|rei|0.0.2 LiveServer|rit|5.7.9 vue-vscode-extensionpack|sdr|0.2.0 vue-vscode-snippets|sdr|3.1.1 wow-bundle|Sep|1.3.0 vscode-table-formatter|shu|1.2.1 vscode-zipexplorer|sle|0.3.1 vscode-taskexplorer|spm|2.13.2 element-ui-snippets|SS|0.7.2 code-spell-checker|str|3.0.1 open-window-tab-context|tak|1.12.0 markdowntable|Tak|0.11.0 even-better-toml|tam|0.19.2 vscode-h2o|tet|0.2.14 bootstrap4-vscode|the|6.1.0 shellcheck|tim|0.34.0 es6-string-html|Tob|2.12.1 vscode-status-bar-format-toggle|tom|3.2.0 pdf|tom|1.2.2 vscode-inline-values-powershell|Tyl|0.0.7 vscode-counter|uct|3.2.1 errorlens|use|3.15.0 vscode-lldb|vad|1.10.0 vscode-svg-previewer|vit|0.7.0 vscode-icons|vsc|12.6.0 whichkey|VSp|0.11.3 vscode-mermaid-preview|vst|1.6.3 volar|Vue|1.8.21 vscode-typescript-vue-plugin|Vue|1.8.21 JavaScriptSnippets|xab|1.8.0 txt-syntax|xsh|0.2.2 current-file-path|yos|4.0.0 markdown-pdf|yza|1.5.0 markdown-all-in-one|yzh|3.5.1 json|Zai|2.0.2 vscode-proto3|zxh|0.5.5 (9 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30856252 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 3biah626:30602489 89544117:30613380 2i9eh265:30646982 showlangstatbar:30737416 962ge761:30841074 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30869155 dsvsc013:30795093 dsvsc014:30804076 pythonmhint1:30842940 dsvsc015:30845448 pythontestfixt:30866405 pyreplss1:30865275 pythoncet00cf:30866519 2e7ec940:30870395 pythontbext0:30864172 ```
bpasero commented 9 months ago

/duplicate https://github.com/microsoft/vscode/issues/130082

VSCodeTriageBot commented 9 months ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!