Microsoft/vscode

Deleting files with vscode fs api can cause contributed custom text editors to not be able to open subsequent files with the same name

Open

#278,883 创建于 2025年11月21日

在 GitHub 查看
 (0 评论) (0 反应) (1 负责人)TypeScript (74,848 star) (10,221 fork)batch import
bugcustom-editorshelp wanted

描述

Does this issue occur when all extensions are disabled?: Yes/No Yes

  • VS Code Version: 1.106.2
  • OS Version: Windows_NT x64 10.0.26100

Steps to Reproduce:

Clone this repository: https://github.com/Greglar4/vscodeBugExampleRepository and follow the readme steps, which are:

  1. Open this project in VS Code
  2. Run npm install
  3. Run npm run build
  4. Run the extension in the development host (e.g. by using F5)
  5. Create a file with .fnf extension
  6. Open the file with the File Not Found Example Editor
  7. Ensure the vs code setting Workbench > Editor: Close On File Delete is off.
  8. Press the button that says "Click Me". This will delete the file via vs code fs api.
  9. Without closing the File Not Found Example Editor, close the vs code window which is running the extension in the development host.
  10. Run the extension in the development host (e.g. by using F5)
  11. Close the editor of the file that was deleted in step 8.
  12. Create a .fnf file with the same name as the file created in step 5.
  13. Try to open the file created in step 12 with the File Not Found Example Editor, it will give a file not found error, even though this file now exists, and that the text editor can open the file fine.

贡献者指南