Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file watching events being lost #12264

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export class MainFileSystemEventService {
const proxy = rpc.getProxy(MAIN_RPC_CONTEXT.ExtHostFileSystemEventService);
const fileService = container.get(FileService);

// file system events - (changes the editor and other make)
const events: FileSystemEvents = {
created: [],
changed: [],
deleted: []
};
this.toDispose.push(fileService.onDidFilesChange(event => {
// file system events - (changes the editor and others make)
const events: FileSystemEvents = {
created: [],
changed: [],
deleted: []
};
for (const change of event.changes) {
switch (change.type) {
case FileChangeType.ADDED:
Expand All @@ -59,9 +59,6 @@ export class MainFileSystemEventService {
}

proxy.$onFileEvent(events);
events.created.length = 0;
events.changed.length = 0;
events.deleted.length = 0;
}));

// BEFORE file operation
Expand Down