Skip to content

add support for additional zip file extensions#244

Closed
letuanhai wants to merge 1 commit intophiresky:masterfrom
letuanhai:master
Closed

add support for additional zip file extensions#244
letuanhai wants to merge 1 commit intophiresky:masterfrom
letuanhai:master

Conversation

@letuanhai
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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