Sub-item changes are no longer sent to a presenter after the main presented item is moved
| Originator: | twiomood | ||
| Number: | rdar://13854293 | Date Originated: | May 9, 2013 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.8.3 |
| Classification: | Crasher/Data loss | Reproducible: | Always |
Summary: NSFilePresenters that are observing a parent directory are not notified of sub-item changes after the parent directory itself is moved.
Steps to Reproduce: Compile the two helper tools attached.
Make two Terminal windows
In the first:
mkdir /tmp/parent
date > /tmp/parent/file
./watch-file /tmp/parent
In the second, issue the following commands one by one, watching the output in the first (which is interspersed below):
./move-file /tmp/parent/file /tmp/parent/file2
2013-05-09 15:39:55.179 watch-file[64567:1807] 35.053001: subitem did change at file://localhost/tmp/parent/file2
2013-05-09 15:39:55.181 watch-file[64567:1d07] 35.055093: subitem did change at file://localhost/tmp/parent/file
./move-file /tmp/parent /tmp/parent2
2013-05-09 15:40:34.662 watch-file[64567:180b] 74.536468: relinquish to writer
2013-05-09 15:40:35.166 watch-file[64567:180b] 75.040040: item did move to file://localhost/tmp/parent2/
2013-05-09 15:40:35.168 watch-file[64567:1a0f] 75.042054: subitem did change at file://localhost/tmp/parent
2013-05-09 15:40:35.170 watch-file[64567:180b] 75.043873: reacquire from writer
./move-file /tmp/parent2/file2 /tmp/parent2/file3
No output!
./move-file /tmp/parent2 /tmp/parent3
2013-05-09 15:41:22.935 watch-file[64567:1b0f] 122.809268: relinquish to writer
2013-05-09 15:41:23.440 watch-file[64567:1b0f] 123.313709: item did move to file://localhost/tmp/parent3/
2013-05-09 15:41:23.441 watch-file[64567:2a1f] 123.315531: reacquire from writer
The file coordination system knows that the presenter is watching the new location, as evidenced by the second move of the parent directory. But after the first move of the parent directory, no sub-item change notifications are sent to the parent.
Expected Results: Sub-item change notifications should be reliable.
Actual Results: Sub-item change notifications are lost, resulting in possible data loss due to failure to read the new state.
Version: 10.8.3
Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Duped as rdar://13855002