Chris Hennick
8c4ee1f42b
Wrap files in RefCell
2023-04-29 13:47:24 -07:00
Chris Hennick
9a47bbb6c8
Refactor: don't search for src_data twice
2023-04-29 13:19:55 -07:00
Chris Hennick
d5681d9ede
Refactor: don't search for src_data twice
2023-04-29 13:16:14 -07:00
Chris Hennick
7d89194298
Bug fix for permissions on deep-copied files
2023-04-29 12:49:20 -07:00
Chris Hennick
a86f87ff6f
Remove unused imports
2023-04-25 16:34:03 -07:00
Chris Hennick
aabdec98aa
Reformat
2023-04-25 15:06:33 -07:00
Chris Hennick
b7f4bd6faf
Minor refactor
2023-04-25 15:06:11 -07:00
Chris Hennick
36e7b19969
Add deep-copy method, and include copying in end-to-end tests
2023-04-24 10:44:36 -07:00
Chris Hennick
406abacd2c
Fix formatting
2023-04-23 16:03:21 -07:00
Chris Hennick
491c512d6c
Update AES library (API has changed)
2023-04-23 16:00:27 -07:00
Chris Hennick
3b3b63cef5
Fix a flaky test
2023-04-23 15:14:44 -07:00
Chris Hennick
6dc099d128
Fix more formatting issues
2023-04-23 15:12:56 -07:00
Chris Hennick
9330bdb7b7
Don't need Read for shallow copy
2023-04-23 15:09:22 -07:00
Chris Hennick
85689cd2e6
Remove unused #![feature(read_buf)]
2023-04-23 15:05:53 -07:00
Chris Hennick
d3400509bc
Fix formatting issues from cargo fmt
2023-04-23 14:58:10 -07:00
Chris Hennick
7e7483ef5c
Remove unnecessary package qualifiers
2023-04-23 14:52:14 -07:00
Chris Hennick
360a7de003
Fix clippy warning: use write_all instead of write
2023-04-23 14:51:17 -07:00
Chris Hennick
cde5d5ed11
Implement shallow copy from within the file being written
2023-04-23 14:33:10 -07:00
Marli Frost
c4c6ec9e7c
fix: clippy
2023-02-01 18:03:03 +00:00
Marli Frost
d06d4b295f
refactor: move the new ZipStreamReader API to the unstable module
2023-02-01 17:55:07 +00:00
Marli Frost
1eb491e96e
fix: clippy lint
2023-02-01 17:39:10 +00:00
Jiahao XU
e322842bfd
Fix clippy warning in stream.rs:85
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
f97f017d99
Rm read::stream::test::zip_contents
...
As streaming mode cannot calculate central_header_start.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
89ff32d93b
Rm infesible guarantee in ZipStreamVisitor::visit_additional_metadata
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
ef1846e121
Rm stream::tests::zip64_with_leading_junk
...
As in streaming mode, there is no way to ignore the leading junk.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
b944bee72d
Add unit tests for mod read::streams
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
c6fe396b56
Impl ZipStreamFileMetadata::is_{dir, file}
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
d858994e1e
Add guarantee for ZipStreamVisitor::visit_additional_metadata
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
8f7c43c227
Rm unnecessary p.exist()
check in ZipStreamReader::extract
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
5b6d9557c6
Impl ZipStreamReader::extract
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
42e2865ccb
derive(Debug)
for ZipStreamFileMetadata
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
02c3699be2
Impl new mod read::stream
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
16753209af
Refactor: Extract ZipFileData::unix_mode
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
a614d1f226
Refactor: Extract ZipFileData::enclosed_name
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
08c2e76705
Fix param order in central_header_to_zip_file_inner
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:31:12 +00:00
Jiahao XU
e99c15471c
Mv central header parsing to central_header_to_zip_file
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:31:12 +00:00
Jiahao XU
57440efa16
Refactor: Extract new fn central_header_to_zip_file_inner
...
that does not require `reader` to implement `io::Seek`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:31:12 +00:00
Marli Frost
0a09253896
docs: clarify how to use the add_directory API
...
closes #323
2023-02-01 17:23:53 +00:00
Marli Frost
42eabc9e33
fix: update references to old from_time API
2023-02-01 14:01:53 +00:00
Kyle Bloom
ccd20c118e
fix: Unused import with time feature
2023-02-01 13:58:15 +00:00
Kyle Bloom
ab2800b4d8
chore: Move use for TryInto to top
2023-02-01 13:58:15 +00:00
Kyle Bloom
c2adaf7ee0
fix: Use try into implementation for from_time
2023-02-01 13:58:15 +00:00
Kyle Bloom
3f770178ec
fix: Change error type to unit-like struct
2023-02-01 13:58:15 +00:00
Kyle Bloom
5726a07a76
feat: Move from_time to try_from
...
Moves from_time function to TryFrom<OffsetDateTime>
2023-02-01 13:58:15 +00:00
Kyle Bloom
9a577d09fb
Merge branch 'zip-rs:master' into fix-clippy-issues
2023-02-01 10:07:13 +00:00
Kyle Bloom
503eda67c3
fix: Clippy should implement trait
2023-01-31 17:36:06 +00:00
Kyle Bloom
03f5009c34
fix: Clippy uninlined format args
2023-01-31 17:29:34 +00:00
Mikael Pettersson
3fc54cf68c
feat: Detect insufficient Dir record size
...
- Per zip spec 4.4.1.4 (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT )
- If a CentralDirectoryEnd record field cannot hold the
required data, a ZIP64 record must exist and the
field will be set to -1(0xFFFF || 0xFFFFFFFF)
- Previously these archives were incorrectly detected as multi-disk
2023-01-30 11:13:01 +01:00
jkasari
7b83591f26
Add units to the size documentation.
...
The documentation did not list what it meant by "size". I changed it to
specify that it is returning the size in bytes.
2023-01-19 18:55:42 -08:00
Wyatt Herkamp
efd7f934ca
Merge remote-tracking branch 'origin/master'
...
# Conflicts:
# src/read.rs
2022-10-13 07:53:55 -04:00