Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Library - Get the latest UserContext during Close
Close is called when all events are done and we get a kernel close request. The kernel can issue an event (GetFileInfo) but actually do not wait for its completion and directly send a close. We will have a race condition in ReleaseDokanOpenInfo where the DokanFileInfo might have the GetFileInfo UserContext and not the Cleanup UserContext that is expected to happen before Close. This change enforce to get the latest UserContext we can get from DokanOpenInfo. Yes, it does not prevent the GetFileInfo to be the latest to set UserContext in EventCompletion but that's the best we can do.
- Loading branch information