Skip to content

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

Closed

Description

@Greglar4

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.

Activity

  1. added
    custom-editors
    bug
    help wanted
    on Dec 9, 2025
  2. added a commit that references this issue on Mar 27, 2026
    ff7810c
  3. dmitrivMS commented on Jul 30, 2026

    @dmitrivMS
    Collaborator

    This was fixed in #287966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcustom-editorshelp wantedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions