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

FastZip.CreateZip() , filter "*.o" will show all files ,filter ".so" will show "*.*so*",it's bad #375

Closed
hygyh opened this issue Aug 12, 2019 · 3 comments
Labels

Comments

@hygyh
Copy link

hygyh commented Aug 12, 2019

Expected behavior

1.the directory has files,ex:xxx.o,xxx.so,xx.soc,xx.oso
2.aFileFiter = ".so"
3.new FastZip().CreateZip(aZipedFileName, aFilePath, true, aFileFiter, aDirectoryFiter);
4.result will show xx.so ,xx.soc ,xx.oso

@Numpsy
Copy link
Contributor

Numpsy commented Aug 12, 2019

I think those filters are supposed to be regular expressions, so those cases might be "anything that includes 'o'" and "anything that includes 'so'"?

(/regex knowledge is extremely basic)

@piksel
Copy link
Member

piksel commented Aug 14, 2019

Indeed!

https://regex101.com/r/0dG0vG/1

To only include files that end with .so use the filter "\\.so$" (escape the dot as it means "any character" and add $ to only match strings that end with the pattern)

@piksel
Copy link
Member

piksel commented Aug 21, 2019

Closing this as it seems to have been answered.

@piksel piksel closed this as completed Aug 21, 2019
Numpsy added a commit to Numpsy/SharpZipLib that referenced this issue Jan 6, 2020
…ocatorSignature, take account of the blocks fixed size.
Numpsy added a commit to Numpsy/SharpZipLib that referenced this issue Jan 7, 2020
piksel pushed a commit that referenced this issue Jan 27, 2020
…ator, pay attention to its fixed size

* Add a ZipConstants entry for the size of the zip64 end of central directory locator
* When looking for Zip64CentralDirLocatorSignature, take account of the blocks fixed size. refs #403/#375
* Add a simple test case for issue 403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants