Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Sep 11, 2025

Address this comment from @brandonpayton by moving the assignment after the check:

If this seek fails, bytes_already_forgotten will be left at the invalid target offset. Is that desired?

Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good change.

It might be good to add a FileWriteStream test to test the result of failing to seek.

@adamziel adamziel merged commit edc3416 into trunk Sep 11, 2025
22 checks passed
@adamziel adamziel deleted the filereadstream-seekoutside branch September 11, 2025 23:53
@adamziel
Copy link
Collaborator Author

I still need to backport this one to WordPress/wordpress-importer#202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants