[PCKPacker] Add method to add files from buffer. - #108830
Merged
Merged
Conversation
Calinou
reviewed
Jul 21, 2025
Calinou
left a comment
Member
There was a problem hiding this comment.
Tested locally, it works as expected.
Code looks good to me.
This unit test can be added after tests/test_pck_packer.h:102:
CHECK_MESSAGE(
pck_packer.add_file_from_buffer("buffer/new.txt", String("Hello world!").to_utf8_buffer()) == OK,
"Adding a file from a buffer to the PCK in a new subdirectory should return an OK error code.");
Member
Author
Done. |
|
Many thanks! EDIT: I'm currently using this productively with great success. Will this still make it into 4.5? Otherwise I'll just keep adding this as a patch onto my own build, EDIT: I've overlooked that it is 4.6, woops. |
|
Can this be merged? It's a very low risk change that doesn't really impact anything negatively, anyway. |
Calinou
approved these changes
Oct 23, 2025
Calinou
left a comment
Member
There was a problem hiding this comment.
I meant to approve this after the unit test was added, and it's here now.
|
thank you :) |
akien-mga
approved these changes
Dec 19, 2025
Contributor
|
Thanks! |
rivie13
pushed a commit
to rivie13/Phoenix-Agentic-Engine
that referenced
this pull request
Feb 16, 2026
[PCKPacker] Add method to add files from buffer.
BendyLand
pushed a commit
to BendyLand/voltaire
that referenced
this pull request
Aug 2, 2026
[PCKPacker] Add method to add files from buffer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes godotengine/godot-proposals#12806
Also fixes off by one file index in the verbose
flushprint.It was problematic before 4.4, since it was storing all files at once at
flush, but in 4.5 files are saved immediately, so it makes sense to allow writing from buffer.