The Wayback Machine - https://web.archive.org/web/20220530091444/https://github.com/rclone/rclone/pull/6152
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

storj: fix put #6152

Merged
merged 1 commit into from May 12, 2022
Merged

storj: fix put #6152

merged 1 commit into from May 12, 2022

Conversation

Erikvv
Copy link
Contributor

@Erikvv Erikvv commented May 6, 2022

The "relative" argument was missing when Put'ing a file. This
sets an incorrect object entry in the cache, leading to the file being
unreadable when using mount functionality.

Fixes #6151 and doesn't seem to break any other functionality.

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate. => I think this should be caught by some integration test for all backends
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

The "relative" argument was missing when Put'ing a file. This
sets an incorrect object entry in the cache, leading to the file being
unreadable when using mount functionality.

Fixes #6151
@Erikvv
Copy link
Contributor Author

@Erikvv Erikvv commented May 6, 2022

I'll investigate which integration test I should extend.

@Erikvv
Copy link
Contributor Author

@Erikvv Erikvv commented May 6, 2022

I'll investigate which integration test I should extend.

It's difficult to create a test because the tests are run inside a bucket (fstest.RandomRemote()), not at "root" level where this problem occurs. This means the bucket is in backend.storj.fs.root, rather than in the relative path.

(Another reason this might not be caught could be because the test uses ObjectInfo.Hash to check equality. This is not implemented for Storj because we do not have a preferred Hash/ETag mechanism, we push this concern to users.)

So for now I offer this change as-is without any regression test.

@ncw
Copy link
Member

@ncw ncw commented May 12, 2022

Thank you for the explanation. I'll run the CI and merge if successful :-)

ncw
ncw approved these changes May 12, 2022
@ncw ncw merged commit 9e48549 into rclone:master May 12, 2022
9 checks passed
@Erikvv Erikvv deleted the storj-fix-mount-put branch May 12, 2022
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

Successfully merging this pull request may close these issues.

2 participants