Bogus "modified by another application" warning in document-based apps
| Originator: | dgatwood42 | ||
| Number: | rdar://18625318 | Date Originated: | 11-Oct-2014 08:40 PM |
| Status: | Open | Resolved: | |
| Product: | OS X | Product Version: | 10.9.5 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: If I examine an XML file within a document bundle using vi while the owning application is open, the next time I try to save the project, I get a warning that incorrectly claims that the project has been modified by another application. I suspect that the vi editor's temp file (in the same directory as the XML file) is tricking OS X into believing that the book package has been modified in a meaningful way when in reality, it hasn't. Please tweak your change detection algorithms to ignore vi temp files. Steps to Reproduce: 1. Create a document-based app whose file type is a bundle. 2. Do your I/O with readFromURL:ofType:error: and writeToURL:ofType:error:, and make autosavesInPlace return "YES". 3. Run the app and open a file. 4. In a terminal window, examine (but do not modify) any file within the bundle. Quit vi so that the temp file gets removed, and the bundle is exactly as it was when the app opened the bundle. 5. Switch back to the app and hit Command-S. Expected Results: I expected the OS to recognize that the end state for the bundle was identical to the state it was in when the app last touched it; the only change was the creation of a ._book.xml.swp temp file, followed by its subsequent deletion. Actual Results: The OS said that the document had been modified. Version: 10.9.5 Notes: If you need me to, I can attach an app that reproduces the problem, but I suspect that it will reproduce with any bundle-based, document-based app.
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!