Microsoft/vscode
View on GitHubDeleting files with vscode fs api can cause contributed custom text editors to not be able to open subsequent files with the same name
Open
#278883 opened on Nov 21, 2025
bugcustom-editorshelp wanted
Description
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:
- Open this project in VS Code
- Run npm install
- Run npm run build
- Run the extension in the development host (e.g. by using F5)
- Create a file with .fnf extension
- Open the file with the File Not Found Example Editor
- Ensure the vs code setting Workbench > Editor: Close On File Delete is off.
- Press the button that says "Click Me". This will delete the file via vs code fs api.
- Without closing the File Not Found Example Editor, close the vs code window which is running the extension in the development host.
- Run the extension in the development host (e.g. by using F5)
- Close the editor of the file that was deleted in step 8.
- Create a .fnf file with the same name as the file created in step 5.
- 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.