[NSFileManager trashItemAtURL: resultingItemURL:error:] doesn't write originating path information to .DS_Store
| Originator: | i.am.qix | ||
| Number: | rdar://23153124 | Date Originated: | 16-Oct-2015 05:37 PM |
| Status: | Open | Resolved: | |
| Product: | OS X | Product Version: | 10.11 |
| Classification: | Reproducible: | Always |
Joshua Junon <16-Oct-2015 05:37 PM> Summary: Upon using [NSFileManager trashItemAtURL:resultingItemURL:error:], the originating path is not stored in the .DS_Store file, causing the `Put Back` option not to be shown for programmatically trashed files. Steps to Reproduce: 1. Touch/create `foobar` file 2. Compile the attached code (trash-basic.m) 3. Run the resulting binary (no arguments required). Expected Results: `foobar` should show up in the Trash with the context menu option to `Put Back` to where it was originally located. Actual Results: `Put Back` is missing altogether from the context menu; file doesn't show up in .DS_Store listings. Version: OS X 10.11 El Capitan, but reported on various other versions as well (see Additional Notes of this report). Notes: This report was originally filed by Sindre Sorhus over at https://github.com/sindresorhus/osx-trash/issues/4. A few people have reported `Put Back` appears with a single file, but subsequent files do not. I have personally not seen a single file work at all. Configuration: Attachments: 'trash-basic.m' was successfully uploaded.
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!
trash-basic.m