Merge lp://staging/~jamesodhunt/libnih/bug-776532 into lp://staging/libnih
Status: | Approved |
---|---|
Approved by: | Scott James Remnant |
Approved revision: | 1055 |
Proposed branch: | lp://staging/~jamesodhunt/libnih/bug-776532 |
Merge into: | lp://staging/libnih |
Diff against target: |
167 lines (+102/-1) 3 files modified
ChangeLog (+10/-0) nih/file.c (+32/-1) nih/tests/test_watch.c (+60/-0) |
To merge this branch: | bzr merge lp://staging/~jamesodhunt/libnih/bug-776532 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Langasek (community) | Disapprove | ||
Scott James Remnant | Approve | ||
Review via email: mp+103891@code.staging.launchpad.net |
Description of the change
* nih/file.c (nih_dir_
nih_dir_walk_scan() to ensure the nih_watch_new() filter function is
passed the NihWatch data rather than the data passed to the
nih_dir_walk() NihFileVisitor function (LP: #776532).
* nih/tests/
to ensure filter is passed correct value.
Unmerged revisions
- 1055. By James Hunt
-
* nih/file.c (nih_dir_
walk_filter) : New NihFileFilter function passed to
nih_dir_walk_scan() to ensure the nih_watch_new() filter function is
passed the NihWatch data rather than the data passed to the
nih_dir_walk() NihFileVisitor function (LP: #776532).* nih/tests/
test_watch. c (test_new): New test "with filter and data"
to ensure filter is passed correct value.
The test suite correctly identifies a bug in this proposed branch. The right fix is for *nih_watch_add* to pass the wrapper *to* nih_dir_ walk_scan( ); nih_dir_walk_scan() should itself not be wrapping anything or assuming anything about the structure of data, which is what's happening here and causing the test suite failure.
I've got a local fix for this which I'll submit as a separate MP shortly.