0

Working on a NSDocument-based app, I discovered that if I delete a file (package) from the filesystem, the app will still try to reopen it—from the trash.

Even if this succeeded it would be confusing. Currently I have a crude check in applicationOpenUntitledFile for url.path.contains(".Trash").

There must be a better way to avoid reopening trashed documents! What is it?

Henrik
  • 3,908
  • 27
  • 48
  • What macOS are you trying this on? It's curious because in my experience I haven't had a problem with this. – Bob Dec 23 '16 at 12:37
  • This is macOS Sierra. And I see I wrote "reopen", what I meant is "restore". – Henrik Dec 24 '16 at 03:21

0 Answers0