Conversation
This reverts commit cf15e72.
| }; | ||
|
|
||
| export async function onUnlink({ ctx, path, type }: Props) { | ||
| try { |
There was a problem hiding this comment.
Just remove try catch here, we are already cathing in the previous one and logging the whole event.
| }; | ||
|
|
||
| export async function onAddDir({ ctx, path }: TProps) { | ||
| try { |
There was a problem hiding this comment.
Just remove try catch here, we are already cathing in the previous one and logging the whole event.
| }; | ||
|
|
||
| export async function onChange({ ctx, path }: Props) { | ||
| try { |
There was a problem hiding this comment.
Just remove try catch here, we are already cathing in the previous one and logging the whole event.
There was a problem hiding this comment.
True true, I thought it was only the things I marked as New.
| await handleDehydrate({ ctx, path }); | ||
| } | ||
| } | ||
| if (fileInfo.inSyncState === InSyncState.NotSync) { |
There was a problem hiding this comment.
This is new.
There was a problem hiding this comment.
I've added the tests for the new cases in a following PR.
| } | ||
| } | ||
|
|
||
| async function handleNonPlaceholderFile(ctx: SyncContext, path: AbsolutePath) { |
There was a problem hiding this comment.
This is new.
|


What
Refactor the watcher in C++. Now we are going to obtain the extended information from windows, which includes an
internalId,size,mtimeandctime. We are going to send all events to javascript and there we are going to log them and group by internalId. The timeout to group is 2s. After that, if we are 2s without having any new event of aninternalIdwe process that last event received with thatinternalId. This improve the issue of the move operation (it sends adeleteevent and after that acreateevent) and also the one of locked files (it sends acreateevent with size 0 and then manyupdateevents with size X until it reaches the final size Y). This second case it's more tricky to test since I don't know how much time can we expect from oneupdateto another. I've added a test for that but probably we will need to continue improving this part.