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

Unable to drop files from a remote #8

Closed
montag451 opened this issue Aug 26, 2016 · 7 comments
Closed

Unable to drop files from a remote #8

montag451 opened this issue Aug 26, 2016 · 7 comments

Comments

@montag451
Copy link

montag451 commented Aug 26, 2016

When I try to drop files from a remote, it doesn't work. Looking at the code, I see that you use "rclone purge" to remove file from a remote, I think you should use "rclone delete" because "rclone purge" only works on "directory".

@montag451 montag451 changed the title Unable to drop files from remote Unable to drop files from a remote Aug 26, 2016
@montag451
Copy link
Author

The failure with "purge" happens only with rclone 1.33. I think the behaviour of "purge" in the new version of rclone is correct because now the command refuse to remove files, it accepts only directories. With the old versions of rclone, you can use "purge" on a file but it remove also the directory containing the file.

DanielDent added a commit that referenced this issue Aug 26, 2016
@DanielDent
Copy link
Member

Thanks for the report. I believe version 0.4 should address issues with rclone 1.33. If you run into any further problems, please feel free to re-open this issue or file a new issue.

@DanielDent
Copy link
Member

@montag451 I just read more closely what you said. Are you saying that "rclone purge" on older versions would delete a parent directory even if other files existed in that directory? If so, please let me know, because that would mean older git-annex-remote-rclone versions may be unsafe to use.

@DanielDent DanielDent reopened this Aug 26, 2016
@montag451
Copy link
Author

Yes. For example, say that you have a directory "foo" on a remote with 2 files inside it (say "bar" and "baz"). If you type the following command:

rclone purge remote:foo/bar

with previous version of rclone, it will delete "bar", "baz" and the directory "foo". So I think previous version of git-annex-remote-rclone are unsafe since dropping one file could in fact drop several files.

@DanielDent
Copy link
Member

That's extremely troubling. Thank you for the report.

@montag451
Copy link
Author

You are welcome!

@DanielDent
Copy link
Member

Added a warning in README.md in 3c2b84b

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