{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/macos-trash/issues/4","repository_url":"https://api.github.com/repos/sindresorhus/macos-trash","labels_url":"https://api.github.com/repos/sindresorhus/macos-trash/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/macos-trash/issues/4/comments","events_url":"https://api.github.com/repos/sindresorhus/macos-trash/issues/4/events","html_url":"https://github.com/sindresorhus/macos-trash/issues/4","id":111565457,"number":4,"title":"`Put back` only works for the first file","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars2.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"labels":[{"id":170430516,"url":"https://api.github.com/repos/sindresorhus/macos-trash/labels/bug","name":"bug","color":"fc2929","default":true},{"id":170430519,"url":"https://api.github.com/repos/sindresorhus/macos-trash/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2015-10-15T08:07:47Z","updated_at":"2017-04-24T16:37:13Z","closed_at":null,"body":"Continued from https://github.com/sindresorhus/trash/issues/24. This is a really weird issue.\n## \n\nOnly the first file trashed with `trashItemAtURL` in a process will have the ability to `Put back` from the trash. I've narrowed down the code and the below still only adds `Put back` for the first file `foo`:\n\n``` objective-c\n@import Foundation;\n\nint main() {\n    [[[NSFileManager alloc] init] trashItemAtURL:[NSURL URLWithString:@\"file:///Users/sindresorhus/dev/osx-trash/foo\"] resultingItemURL:nil error:nil];\n    [[[NSFileManager alloc] init] trashItemAtURL:[NSURL URLWithString:@\"file:///Users/sindresorhus/dev/osx-trash/bar\"] resultingItemURL:nil error:nil];\n\n    return 0;\n}\n```\n## \n\nI'm starting to think this is a OS X bug. Would appriciate being proved wrong, though. Gonna open an issue on radar when I get a chance, unless someone can figure this out.\n"},"comment":{"url":"https://api.github.com/repos/sindresorhus/macos-trash/issues/comments/296734112","html_url":"https://github.com/sindresorhus/macos-trash/issues/4#issuecomment-296734112","issue_url":"https://api.github.com/repos/sindresorhus/macos-trash/issues/4","id":296734112,"user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars2.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"created_at":"2017-04-24T16:37:13Z","updated_at":"2017-04-24T16:37:13Z","body":"@h0d I doubt that will make any difference. That Swift call uses the same Objective-C API underneath."}}
{"actor":{"display_login":"sindresorhus"}}