Microsoft/vscode
View on GitHubSearch all files (ctrl+shift+f) doesn't find results in files with very long filepaths unless opened in the editor
Open
#116,303 opened on Feb 10, 2021
bugconfirmedhelp wantedsearchupstream
Description
- VS Code Version: 1.53.1 5d424b828ada08e1eb9f95d6cb41120234ef57c7 x64
- OS Version: Windows 10 Pro - Build 19041
Steps to Reproduce:
- Make a new file with a very long filepath in vs code.
- When the file is not open in the editor, use ctrl+shift+f to search for any content in the file. No results appear.
- Open the file and search again. Results appear.
Specific steps to reproduce on Windows 10:
- Make a number of nested folders in windows explorer until this error appears:

- Add more nested folders/files to this directory using VS code.
- Make a txt file with a specific string in it and search for this string when the file is not opened in the editor.
The error seems to occur with filepaths exceeding the max filepath length of windows explorer.
Examples:
The bug in action:

Example Path: C:\Users<MY-USERNAME>\Desktop\long-named-foler-to-reproduce-bug-of-eternal-destruction\long-named-child-foler-to-reproduce-bug-of-eternal-destruction\long-named-child-foler-to-reproduce-bug-of-eternal-destruction\another-long-nameanother-long-nameanother-long-nameanother-long-name\deep.txt
Does this issue occur when all extensions are disabled?: Yes
Console output:
