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

Should REMOVE return a failure status if the file didn't exist in the first place? #287

Open
slifty opened this issue Oct 26, 2023 · 0 comments

Comments

@slifty
Copy link
Contributor

slifty commented Oct 26, 2023

This is potentially an existential question, but I realize I made a decision in implementation long ago that warrants at least some discussion.

The SFTP v2 specification describes REMOVE functionality but does not explain the circumstances under which a response should return SUCCESS vs FAILURE.

As currently implemented we return a FAILURE if a file does not exist, but this is potentially strange since that means the final state is actually the intended state from a user operation perspective.

For rclone this failure means the program goes on to attempt (and of course fail) to remove the path as a directory.


This is not necessarily an incorrect implementation! I just wanted to raise it.

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

1 participant