Anyone able to get .Trashes to work on OSX Sierra?

60 views
Skip to first unread message

Marc Miller

unread,
Feb 18, 2017, 4:35:50 PM2/18/17
to OSXFUSE
Apparently Apple changed something with Sierra, because I can't seem to get .Trashes to work merely by creating a directory of that name (see https://github.com/osxfuse/osxfuse/issues/246).  Meaning, if you try to delete a file from within Finder, you will get a warning saying that the file will be deleted permanently.  Instead, I would like those files to be moved to .Trashes just like any other OSX volume.

I did a little investigating and saw that Finder, upon clicking "Move to Trash" from the context menu, will call stat() on the .Trashes folder, but no matter how much I try to duplicate the same statbuf as the native .Trashes/ folder, I don't seem to be successful at foolin' Finder.

Any thoughts?

Marc Miller

unread,
Feb 21, 2017, 9:47:18 AM2/21/17
to OSXFUSE
Just in case someone else is looking for this, it turns out that Sierra relies on subdirectories under .Trashes which are named with the userid of the user doing the trashing (so e.g., ".Trashes/12345").  Note: it doesn't seem like Finder will try to create these directories, but will still fail the trash codepath if they don't exist beforehand.
Reply all
Reply to author
Forward
0 new messages