Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Rewind file in Storage::Fog if bucket does not exist #2572

Merged
merged 1 commit into from
Mar 9, 2018

Conversation

natesholland
Copy link
Contributor

There was a bug in the code where if you created a bucket the file would
get read but not rewind on the first pass through (when the bucket
didn't exist). So when we went into the retry logic the file would
already be read and zero bytes would get copied over from the file. This
fixes that by rewinding the file during the retry so it gets correctly
copied over the second time around.

There was a bug in the code where if you created a bucket the file would
get read but not rewind on the first pass through (when the bucket
didn't exist). So when we went into the retry logic the file would
already be read and zero bytes would get copied over from the file. This
fixes that by rewinding the file during the retry so it gets correctly
copied over the second time around.
@sidraval
Copy link
Contributor

sidraval commented Mar 9, 2018

Thanks for the PR 👍

@sidraval sidraval merged commit c695055 into thoughtbot:master Mar 9, 2018
@natesholland
Copy link
Contributor Author

I know this is a stretch @sidraval but is there any chance you could port this over into the v4.3 branch? We are currently bumping up to 4.3.7 and had to monkey patch around this issue (hence the PR). It would be greatly appreciated if thoughtbot could port this fix over into the 4.3 branch.

@sidraval
Copy link
Contributor

sidraval commented Mar 9, 2018

@natesholland I've got it on a branch: https://github.com/thoughtbot/paperclip/tree/v4.3.8 but I'm experiencing CI failures that I don't have the bandwidth to deal with at the moment. You're welcome to take a peek, but I don't think I should cut v4.3.8 without passing CI at least.

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

Successfully merging this pull request may close these issues.

2 participants