Deleted file recreates itself if it's also open within a buffer
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
If a file is open within a buffer in the editor, but deleted from the project side panel, within ~30-60 seconds it will resave and appear in the project directory again.
To recreate the issue open a file in a new buffer and save it within the project directory, then delete it from the side bar but keep the file open in the buffer. After a short period the file will be persisted again within the project directory.
I would expect the file to be fully removed unless I explicitly save the file again from an open buffer.
I do have "autosave": "on_focus_change" enabled within my editor.
Environment
Zed: v0.126.3 (Zed) OS: macOS 14.4.0 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.
No response
I've just had a deleted file recreate itself even when not open in the buffer, so there is something odd going on here. FWIW it did take awhile before the deleted file was created again.
Do you think you're experiencing a similar problem to the one described in #9101?
Do you think you're experiencing a similar problem to the one described in #9101?
It certainly appears related. I think the behaviour I'm observing is slightly different. Effectively what I'm seeing is files recreate themselves if there is a buffer open for that file within 30-60 seconds roughly. I'm also observing them recreate when the buffer is closed, but it seems to take longer.
So deletes are broken where the other issue seems to describe an inconsistency?
https://github.com/zed-industries/zed/pull/9813 might have helped with this: now, unless the deleted file was edited in the multibuffer, it should not touch it on save.
is there a solution for this issue ? I'm struggling with this problem.