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

add support for additional zip file extensions #244

Closed
wants to merge 1 commit into from

Conversation

letuanhai
Copy link

This commit allows the user to specify additional zip extensions in the config file. This is implemented by adding a new optional field to the config file, additional_extensions_zip, which is a list of strings. If this field is present, the program will use the specified extensions in addition to the default ones.

Internally, the AdapterMeta struct that store file extension matchers is moved into the ZipAdapter struct, and the constructor for ZipAdapter is modified to take the additional extensions as a parameter. The AdapterMeta struct is then constructed with the default extensions and the additional extensions, if any.

This commit allows the user to specify additional zip extensions in the config file.
This is implemented by adding a new optional field to the config file, additional_extensions_zip, which is a list of strings.
If this field is present, the program will use the specified extensions in addition to the default ones.

Internally, the AdapterMeta struct that store file extension matchers is moved into the ZipAdapter struct, and the constructor for ZipAdapter is modified to take the additional extensions as a parameter.
The AdapterMeta struct is then constructed with the default extensions and the additional extensions, if any.
@letuanhai letuanhai marked this pull request as ready for review August 30, 2024 20:17
@lafrenierejm
Copy link
Contributor

@letuanhai Hello! I had been working in parallel on #247. I believe our two PRs have very similar goals. If you ever have the time, I would very much appreciate any feedback on #247 including whether you think the more generic approach it proposes would even be useful compared to the approach you took in this PR. I'm new to Rust, and open to any suggestions now matter how big or small. Thanks in advance!

@letuanhai
Copy link
Author

@letuanhai Hello! I had been working in parallel on #247. I believe our two PRs have very similar goals. If you ever have the time, I would very much appreciate any feedback on #247 including whether you think the more generic approach it proposes would even be useful compared to the approach you took in this PR. I'm new to Rust, and open to any suggestions now matter how big or small. Thanks in advance!

Hi. I took a look at your PR (#247) and really like the more generic approach you went with. I’m also pretty new to Rust, so I don’t have any extra feedback, but your solution seems great to me. I’m closing mine in favor of yours. Thanks for the great work!

@letuanhai letuanhai closed this Sep 17, 2024
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