Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trash -F deletes file immediately on network/shared drives #32

Open
deus0ww opened this issue Mar 21, 2019 · 1 comment
Open

trash -F deletes file immediately on network/shared drives #32

deus0ww opened this issue Mar 21, 2019 · 1 comment

Comments

@deus0ww
Copy link

deus0ww commented Mar 21, 2019

Command output:
trash: some files were not moved to trash (authentication cancelled?)

Is this expected? If it is, I'll workaround it in some other way. If not, I would really appreciate it if you fix it. The current behavior is surprising and dangerous (I already lost a few files). I would expected the command to either fail silently or with the normal Finder warning dialog.

Note that without the '-F', the command fails as expected without deleting the file. Command output:
trash: file_name: can not move to trash (-120: Directory not found)

@jjarava
Copy link

jjarava commented May 28, 2019

This also happens when using a "mounted" virtual volume (such as Google Drive mounted via MountainDuck). When deleting a file with plain trash, the operation fails, but with trash -F it works although you get an error message (and the "trash" sound plays):

$ ll Safari*pdf
-rw-r--r--  1 jjarava  staff   196K Feb  6  2018 Safari - 6 feb 2018 22:35.pdf
-rw-r--r--  1 jjarava  staff   196K Feb  6  2018 Safari - 6 feb 2018 22:35 copy.pdf
jjarava$
jjarava$
jjarava$ trash Safari\ -\ 6\ feb\ 2018\ 22\:35\ copy.pdf
trash: Safari - 6 feb 2018 22:35 copy.pdf: can not move to trash (-120: Directory not found)
jjarava$ ll Safari*pdf
-rw-r--r--  1 jjarava  staff   196K Feb  6  2018 Safari - 6 feb 2018 22:35.pdf
-rw-r--r--  1 jjarava  staff   196K Feb  6  2018 Safari - 6 feb 2018 22:35 copy.pdf
jjarava$ trash -F Safari\ -\ 6\ feb\ 2018\ 22\:35\ copy.pdf
trash: some files were not moved to trash (authentication cancelled?)
jjarava$
jjarava$ ll Safari*pdf
-rw-r--r--  1 jjarava  staff   196K Feb  6  2018 Safari - 6 feb 2018 22:35.pdf

When trying to delete the same file from the Finder directly, there's a message that allows to cancel the operation:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants