server: implement move/rename change notifications and support for multiple change notification in one reply
pujos.michael at laposte.net
Tue Dec 16 19:04:44 CST 2008
Hi, this is my first patch.
I'm not sure it is sent correctly as I'm not using IMAP but using
thunderbird and the instructions were not very clear in that case.
This patch is an enhancement of the ReadDirectoryChangesW() API. This
API monitor directory changes.
It addresses the following issues:
1. move and rename of files and directories in a monitored directory are
2. the current implementation allow to only get one change
(FILE_NOTIFY_INFORMATION structure) at a time.
No change is actually lost but the calling application using
ReadDirectoryChangesW() expect to retrieve all changes since the last call.
With the current implementation it would only get the first and would
have to call ReadDirectoryChangesW() again to get the other. With this
it gets all notification (as many consecutive FILE_NOTIFY_INFORMATION
structs) since the last call to ReadDirectoryChangesW().
These move operations are implemented by this patch and conform to what
- Moving a directory or a file inside the monitored directory. A
FILE_NOTIFY_INFORMATION structure with action FILE_ACTION_ADDED
- Moving a directory or a file out of the monitored directory. A
FILE_NOTIFY_INFORMATION structure with action FILE_ACTION_REMOVED
- Renaming a directory or a file in the monitored directory. Two
consecutive FILE_NOTIFY_INFORMATION structures with actions
FILE_ACTION_RENAMED_OLD_NAME and FILE_ACTION_RENAMED_NEW_NAME are
returned within the same reply. This can actually be done because issue 2
above is corrected.
All the tests in kernel32/change.c passes in wine as well as compiled
under MSVC. I've also added the test cases for the move operation above.
My real world test case was to fix foobar2000 monitoring changes to
music folders (moving files).
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-patches