Microsoft/vscode

Search 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

View on GitHub
 (33 comments) (20 reactions) (1 assignee)TypeScript (74,848 stars) (10,221 forks)batch import
bugconfirmedhelp wantedsearchupstream

Description

  • VS Code Version: 1.53.1 5d424b828ada08e1eb9f95d6cb41120234ef57c7 x64
  • OS Version: Windows 10 Pro - Build 19041

Steps to Reproduce:

  1. Make a new file with a very long filepath in vs code.
  2. When the file is not open in the editor, use ctrl+shift+f to search for any content in the file. No results appear.
  3. Open the file and search again. Results appear.

Specific steps to reproduce on Windows 10:

  1. Make a number of nested folders in windows explorer until this error appears: image
  2. Add more nested folders/files to this directory using VS code.
  3. 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: 2832acd2-2bfb-43e3-a0b0-be5867ba5f6e

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: image

Contributor guide