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

Remove unused Writable::create() function #197

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

hasenbanck
Copy link
Collaborator

@hasenbanck hasenbanck commented Dec 16, 2024

The functionality isn't used anymore, since the add_file() function will call create_dir_all() if not all folders are found.

@vE5li
Copy link
Owner

vE5li commented Dec 16, 2024

Can we make this a cfg_attr only when patched_as_folder is enabled?

@hasenbanck
Copy link
Collaborator Author

Sure! Great idea!

@hasenbanck
Copy link
Collaborator Author

@vE5li After having looked intot he code: Where do we use this anyhow? I can't find any usage of the create function in the code, so putting it behind "patched_as_folder" seems odd right now.

@vE5li
Copy link
Owner

vE5li commented Dec 16, 2024

Huh.. I was sure it's used in the gamefile loader when creating the patched lua files but I can't find it either (I'm on mobile so take that with a grain of salt). Maybe it's not used anymore.

@hasenbanck
Copy link
Collaborator Author

We use "create_dir_all" in the "add_file" also, so it seems we don't need a dedicated logic to create the whole folder structure anymore. I will remove the function for now.

The functionality isn't used anymore, since the add_file() function will call create_dir_all() if not all folders are found.
@hasenbanck hasenbanck force-pushed the allow_unused_writable branch from cdb32d2 to ed0ad29 Compare December 16, 2024 12:22
@hasenbanck hasenbanck changed the title Allow unused on Writable trait Remove unused Writable::create() function Dec 16, 2024
@hasenbanck hasenbanck merged commit c9b6f1b into vE5li:main Dec 16, 2024
3 checks passed
@hasenbanck hasenbanck deleted the allow_unused_writable branch December 16, 2024 15:53
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