Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
be5a757c
Commit
be5a757c
authored
Jan 18, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't report rename events when file is moved between directories.
parent
b614a153
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
change.c
server/change.c
+20
-2
No files found.
server/change.c
View file @
be5a757c
...
...
@@ -123,6 +123,7 @@ static struct fd *inotify_fd;
struct
change_record
{
struct
list
entry
;
unsigned
int
cookie
;
struct
filesystem_event
event
;
};
...
...
@@ -605,7 +606,7 @@ static int inotify_get_poll_events( struct fd *fd )
}
static
void
inotify_do_change_notify
(
struct
dir
*
dir
,
unsigned
int
action
,
const
char
*
relpath
)
unsigned
int
cookie
,
const
char
*
relpath
)
{
struct
change_record
*
record
;
...
...
@@ -618,6 +619,7 @@ static void inotify_do_change_notify( struct dir *dir, unsigned int action,
if
(
!
record
)
return
;
record
->
cookie
=
cookie
;
record
->
event
.
action
=
action
;
memcpy
(
record
->
event
.
name
,
relpath
,
len
);
record
->
event
.
len
=
len
;
...
...
@@ -809,7 +811,7 @@ static void inotify_notify_all( struct inotify_event *ie )
{
LIST_FOR_EACH_ENTRY
(
dir
,
&
i
->
dirs
,
struct
dir
,
in_entry
)
if
((
filter
&
dir
->
filter
)
&&
(
i
==
inode
||
dir
->
subtree
))
inotify_do_change_notify
(
dir
,
action
,
path
);
inotify_do_change_notify
(
dir
,
action
,
ie
->
cookie
,
path
);
if
(
!
i
->
name
||
!
prepend
(
&
path
,
i
->
name
))
break
;
...
...
@@ -1177,6 +1179,22 @@ DECL_HANDLER(read_change)
LIST_FOR_EACH_ENTRY
(
record
,
&
events
,
struct
change_record
,
entry
)
{
data_size_t
len
=
offsetof
(
struct
filesystem_event
,
name
[
record
->
event
.
len
]
);
/* FIXME: rename events are sometimes reported as delete/create */
if
(
record
->
event
.
action
==
FILE_ACTION_RENAMED_OLD_NAME
)
{
struct
list
*
elem
=
list_next
(
&
events
,
&
record
->
entry
);
if
(
elem
)
next
=
LIST_ENTRY
(
elem
,
struct
change_record
,
entry
);
if
(
elem
&&
next
->
cookie
==
record
->
cookie
)
next
->
cookie
=
0
;
else
record
->
event
.
action
=
FILE_ACTION_REMOVED
;
}
else
if
(
record
->
event
.
action
==
FILE_ACTION_RENAMED_NEW_NAME
&&
record
->
cookie
)
record
->
event
.
action
=
FILE_ACTION_ADDED
;
memcpy
(
event
,
&
record
->
event
,
len
);
event
+=
len
;
if
(
len
%
sizeof
(
int
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment