Commit e4faabfa authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

server: Track created and removed directories in the tree of inodes for inotify.

Add them to or remove them from existing recursive watches.
parent 43a0f0c8
......@@ -1793,7 +1793,7 @@ static void WINAPI read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, ULONG st
struct read_changes_info *info = user;
char path[PATH_MAX];
NTSTATUS ret = STATUS_SUCCESS;
int len, action;
int len, action, i;
TRACE("%p %p %p %08lx\n", info, info->ApcContext, iosb, status);
......@@ -1823,6 +1823,11 @@ static void WINAPI read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, ULONG st
pfni = (PFILE_NOTIFY_INFORMATION) info->Buffer;
/* convert to an NT style path */
for (i=0; i<len; i++)
if (path[i] == '/')
path[i] = '\\';
len = ntdll_umbstowcs( 0, path, len, pfni->FileName,
info->BufferSize - sizeof (*pfni) );
......@@ -1900,6 +1905,7 @@ NtNotifyChangeDirectoryFile( HANDLE FileHandle, HANDLE Event,
req->event = Event;
req->filter = CompletionFilter;
req->want_data = (Buffer != NULL);
req->subtree = WatchTree;
req->io_apc = read_changes_apc;
req->io_sb = IoStatusBlock;
req->io_user = info;
......
......@@ -1400,6 +1400,7 @@ struct read_directory_changes_request
obj_handle_t handle;
obj_handle_t event;
unsigned int filter;
int subtree;
int want_data;
void* io_apc;
void* io_sb;
......@@ -4363,6 +4364,6 @@ union generic_reply
struct query_symlink_reply query_symlink_reply;
};
#define SERVER_PROTOCOL_VERSION 226
#define SERVER_PROTOCOL_VERSION 227
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
......@@ -1044,6 +1044,7 @@ enum char_info_mode
obj_handle_t handle; /* handle to the directory */
obj_handle_t event; /* handle to the event */
unsigned int filter; /* notification filter */
int subtree; /* watch the subtree? */
int want_data; /* flag indicating whether change data should be collected */
void* io_apc; /* APC routine to queue upon end of async */
void* io_sb; /* I/O status block (unique across all async on this handle) */
......
......@@ -1448,6 +1448,7 @@ static void dump_read_directory_changes_request( const struct read_directory_cha
fprintf( stderr, " handle=%p,", req->handle );
fprintf( stderr, " event=%p,", req->event );
fprintf( stderr, " filter=%08x,", req->filter );
fprintf( stderr, " subtree=%d,", req->subtree );
fprintf( stderr, " want_data=%d,", req->want_data );
fprintf( stderr, " io_apc=%p,", req->io_apc );
fprintf( stderr, " io_sb=%p,", req->io_sb );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment