[Bug 25265] Foobar2000 won't watch folders

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jan 22 06:21:26 CST 2011


http://bugs.winehq.org/show_bug.cgi?id=25265

Michael Pujos <pujos.michael at laposte.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pujos.michael at laposte.net

--- Comment #3 from Michael Pujos <pujos.michael at laposte.net> 2011-01-22 06:21:25 CST ---
Folder watching do not work in foobar 2000 because ReadDirectoryChangesW()
implementation in wine is horribly broken.
In 2008 I did a patch that fixed it, but it didn't get accepted because it was
not a trivial patch, was modifying wine server protocol, and was my first
submitted patch and I was recommended to breakdown the patch into several
sub-patches, which didn't make sense at all.
Not having the patience to wait for an eventual approval by 2015 if lucky, I
abandonned.

The problem in  ReadDirectoryChangesW() is the following:

"1. move and rename of files and directories in a monitored directory are not
notified 
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 patch , 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 win32
does:

- Moving a directory or a file inside the monitored directory. A
FILE_NOTIFY_INFORMATION structure with action FILE_ACTION_ADDED

is returned

- Moving a directory or a file out of the monitored directory. A
FILE_NOTIFY_INFORMATION structure with action FILE_ACTION_REMOVED

is returned

- 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."



The original patch addressing problems above can be found here:

http://bubbleguuum.free.fr/0001-server-implement-move-rename-change-notifications-and-support-for-multiple-change-notification-in-one-reply.txt

It would be great if a high profile wine developper would take on it, as this
really needs to be fixed.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list