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

Fix region file creation and template writing in create_region function #84

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

louis-e
Copy link
Owner

@louis-e louis-e commented Nov 2, 2024

  • Added .create(true) to File::options() in create_region to ensure the region file is created if it doesn't exist, resolving "file not found" error.
  • Replaced std::fs::copy with include_bytes! macro for in-memory access to region.template, simplifying file handling and improving performance.

These changes ensure smoother file creation and handling during world generation.

- Added `.create(true)` to `File::options()` in `create_region` to ensure the region file is created if it doesn't exist, resolving "file not found" error.
- Replaced `std::fs::copy` with `include_bytes!` macro for in-memory access to `region.template`, simplifying file handling and improving performance.

These changes ensure smoother file creation and handling during world generation.
@louis-e louis-e merged commit 7c62da6 into main Nov 2, 2024
3 checks passed
@louis-e louis-e deleted the region_file_fix branch November 2, 2024 15:57
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.

1 participant