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?