jskinner / DefaultPackages

Old bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
http://web.archive.org/web/20150524043750/https://www.sublimetext.com/forum/viewtopic.php?f=2&t=12095
26 stars 2 forks source link

File deletion fails without error message on OS X filesystems without a trash folder #184

Closed taruti closed 8 years ago

taruti commented 8 years ago

This might be two issues:

1) Errors on file deletion are not reported in DeleteFileCommand, the return value from send2trash is ignored making it hard to see what happens. Handling the errors like DeleteFolderCommand does could make sense.

2) File deletion on filesystems without a trash folder is not supported.

send2trash ends up calling FSMoveObjectToTrashSync from CoreServices. The function returns an errors and does not remove the file on filesystems without a trash can. OSXFuse (3.2.0) sshfs is an example of such a filesystem, but in general this is the case for most fuse filesystems.

Finder handles errors from FSMoveObjectToTrashSync and then asks the user and deletes the file upon user confirmation. Doing likewise might be a solution.

Tested with Sublime Text build 3103.

FichteFoll commented 8 years ago

This issue was moved to SublimeTextIssues/Core#1188