Marli Frost
103003388c
feat: implement a defensive sanitisation strategy
2020-09-12 10:51:23 +01:00
Marli Frost
fb5105725f
refactor: reintroduce path sanitization strategy
...
I've documented the drawbacks of this strategy to make sure users are
aware of the tradeoff being made.
2020-09-12 10:45:53 +01:00
Plecra
e7502199f9
Merge pull request #197 from mvdnes/unbreak-0.5
...
Remove breaking changes in 0.5.7
2020-09-10 11:42:53 +01:00
Marli Frost
5e5bd86915
refactor: remove extra variants from ZipError
2020-09-10 10:21:47 +01:00
Marli Frost
f863497e9b
feat: expose the location of the central header
2020-09-10 09:34:24 +01:00
Marli Frost
9d978e3c51
docs: remove clutter from doctest
2020-08-26 15:15:04 +01:00
Marli Frost
25d479e65d
chore: remove dead code for 0.5.7
2020-08-25 22:05:56 +01:00
Marli Frost
0b46263eac
fix: ZipArchive::extract incomplete
...
Path sanitization needs to be implemented before we can make this public
2020-08-19 15:12:35 +01:00
Marli Frost
d92a06adec
docs: deprecate poor Path sanitization
2020-08-19 13:53:21 +01:00
Marli Frost
599640c1eb
docs: remove redundant example
2020-08-19 13:52:46 +01:00
Marli Frost
bebecb8301
docs: use more descriptive language
2020-08-19 13:52:27 +01:00
Marli Frost
e8eb019e99
docs: simplify doctest
2020-08-19 13:51:50 +01:00
nickbabcock
ef5ce23d85
Fix overflow in directory counts of ZIP64 files
2020-08-10 21:22:49 -05:00
Plecra
510f1cce7b
Merge pull request #116 from zacps/extract
...
Add function to extract a all files in an archive to a directory
2020-06-26 09:32:46 +01:00
Zac Pullar-Strecker
a3aac29e85
switch extract from dynamic to static dispatch
2020-06-26 10:53:57 +12:00
Zac Pullar-Strecker
080292c6c3
Add doc comment about extract bailing without cleanup
2020-06-24 10:16:27 +12:00
Benjamin Richner
d4100190e5
run cargo fmt
2020-06-23 21:23:36 +02:00
Benjamin Richner
4f36a27c32
Use matcher clause instead of clumsy if expressions
2020-06-23 21:20:30 +02:00
Benjamin Richner
fb4f3c5c21
Rename by_name_internal
to by_name_with_optional_password
and by_index_internal
to by_index_with_optional_password
2020-06-23 21:17:52 +02:00
Benjamin Richner
07caeca6ea
Use let .. = &mut
instead of let ref mut .. =
2020-06-23 21:12:36 +02:00
Benjamin Richner
d50dcaced7
run cargo fmt
2020-06-23 20:46:41 +02:00
Benjamin Richner
dbae003aca
Merge improvements from master
2020-06-23 20:44:18 +02:00
Plecra
e123567862
Merge branch 'master' into any-flate2-backend
2020-06-23 16:51:15 +01:00
Jeremy Aube
d382f04e5a
Change default comment to String::new() and fixed tests
2020-06-21 12:38:36 -04:00
Benjamin Richner
493afdbee1
run cargo fmt
2020-06-21 17:47:08 +02:00
Benjamin Richner
bd3ed222ac
Merge improvements from master
2020-06-21 17:43:40 +02:00
Marli Frost
e8f576e179
chore: allow internal use of deprecated items
2020-06-17 18:20:40 +01:00
Piotr Maks
d1bdd552e9
Enable deflated compression method for any flate2 backend
...
Allow using other than default flate2 backend for deflated compression
method. The motivation for this change was to allow using different
backends in dependent crates.
2020-06-17 07:23:32 +02:00
Marli Frost
9ed6904383
refactor: replace the podio crate with byteorder
2020-06-16 18:59:13 +01:00
Ryan Levick
5e76689f49
Don't run doc test since it will panic
2020-06-16 18:54:42 +02:00
Zac Pullar-Strecker
c074a3090c
run rustfmt
2020-06-16 14:45:36 +12:00
Zac Pullar-Strecker
f04e4f4a04
Changes from review
2020-06-16 14:38:35 +12:00
Zac Pullar-Strecker
178699d2d5
Add function to extract a all files in an archive to a directory
2020-06-16 14:38:35 +12:00
Ryan Levick
96354ffa09
More cleanup
2020-06-15 18:09:10 +02:00
Ryan Levick
4e4bbef51b
Merge pull request #109 from JDepooter/add_header_start
...
Add ZipFile::header_start
2020-06-15 14:49:08 +02:00
Ryan Levick
31b4b5c842
Address clippy issues
2020-06-15 11:11:17 +02:00
Ryan Levick
ebb07348ee
Run cargo fmt
2020-06-15 10:44:39 +02:00
Benjamin Richner
f9116fc9c8
Clean up whitespaces
2020-05-21 22:14:53 +02:00
Benjamin Richner
cf7ff173b3
merge edition 2018 and other improvements from master
2020-05-21 21:58:38 +02:00
Manu Thambi
91c93579f2
Added ZipArchive::file_names() method to return an iterator of all the file names
...
in the archive.
Using ZipArchive::by_index() to obtain a list of files is slow, if the files are
not read, because it creates the decompressor internally before returning ZipFile.
Fixes #122
2020-01-14 09:58:12 -05:00
Manu Thambi
69ad3bd2a4
Enable reading/writing ZIP archive comment.
2020-01-09 11:58:35 -05:00
Lachezar Lechev
29517e9a6b
run cargo fix --edition-idioms
and manually fix other things
2019-11-11 09:20:31 +02:00
Lachezar Lechev
99dba6b397
run cargo fix --edition
2019-11-11 08:58:59 +02:00
Benjamin Richner
744bb41b43
Ignore password if file not encrypted. Clean up code structure.
2019-10-20 00:58:07 +02:00
Benjamin Richner
1f87098e57
Enable decryption with file reader by_name()
2019-10-19 23:43:33 +02:00
Benjamin Richner
f9f5029fc1
Added ZipCrypto support for stored and deflated files
2019-10-19 18:59:10 +02:00
Joel Depooter
cd867ecdc2
Add ZipFile::header_start
...
This function returns the offset of the local zip header for a ZipFile object
2019-07-02 16:27:45 -07:00
jonpas
14f77b390a
Use deflate as feature name
2019-06-17 21:36:38 +02:00
jonpas
b171b915f8
Switch to flate2
2019-06-14 15:25:00 +02:00
Damien Collard
b9af51e654
Add ZipFile::is_dir() and ZipFile::is_file().
...
The naming matches that of std::fs::Metadata.
An entry is determined to be a directory based on the presence of
a trailing path separator, i.e. '/' or '\'.
This patch adds a small test zip containing files and directories.
Their names match their type so as to make testing easy.
2019-01-27 15:57:30 +01:00