-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Bug Description:
When listening to the FileService's onDidFilesChange event in FileTreeModel ([file-tree-model.ts] the same file change event is emitted multiple times for a single file creation. I added a debug log in onFilesChanged and observed duplicate, identical events for newly created files.
Steps to Reproduce:
- In file-tree-model.ts (class FileTreeModel), add the following line inside onFilesChanged to log incoming events:
console.log('File changes detected:', changes);
- Open any workspace, create several .txt files in the workspace, and open these files in the editor.
- Observe the developer console / terminal output. The "File changes detected" log appears multiple times for the same file creation event (the logged changes payloads are identical).
Observed Behavior:
The onDidFilesChange event handler receives duplicate identical FileChangesEvent notifications for a single file creation. Each duplicate contains the same change data.
Expected Behavior:
The onDidFilesChange event should be emitted once per actual filesystem change. The file creation should produce a single FileChangesEvent reporting the new resource.
Additional Information:
Operating System: Windows 11
Theia Version: 1.65.0