Skip to content

Conversation

@jhunschejones
Copy link
Owner

The pCloud API has a weird quirk where you can get nil or [] for a folders contents when there really are contents. To work around this, the gem has a retry mechanism to double check if empty contents are truly empty. Perhaps this should be optout-able in the future, but for now it's the default behavior because unexpected empty contents can be a big problem and hard to troubleshoot.

Unfortunately, in my initial implementation, I didn't account for the case where there really were no contents in the folder, would caused a SystemStackError error when calling contents on an empty folder 🤦🏼‍♂️.

This PR resolves fix resolves that bug by manually checking if the contents call is a retry. It also reduces test mocking to hopefully prevent future bugs in this area as well 🙏🏻

@jhunschejones jhunschejones merged commit 9cc74c1 into master Nov 1, 2025
9 checks passed
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