Skip to content

tools/mkrelease: handle corner case - #14369

Merged
Frenzie merged 1 commit into
koreader:masterfrom
benoit-pierre:pr/fix_mkrelease_corner_case
Sep 27, 2025
Merged

Frenzie merged 1 commit into
koreader:masterfrom
benoit-pierre:pr/fix_mkrelease_corner_case

Conversation

@benoit-pierre

@benoit-pierre benoit-pierre commented Sep 27, 2025 •

Copy link
Copy Markdown
Member

7z shows an empty CRC for empty files when generating an archive manifest:

▸ mkdir dir
▸ touch dir/empty
▸ echo foobar >dir/foobar
▸ 7z a test.7z dir
[…]

▸ 7z -ba h dir
                        dir
B22C9747             7  dir/foobar
00000000             0  dir/empty

▸ 7z -ba -slt l test.7z
Path = dir
Size = 0
Packed Size = 0
Modified = 2025-09-27 22:55:25.7947183
Attributes = D drwxr-xr-x
CRC =
Encrypted = -
Method =
Block =

Path = dir/empty
Size = 0
Packed Size = 0
Modified = 2025-09-27 22:43:34.0722990
Attributes = A -rw-r--r--
CRC =
Encrypted = -
Method =
Block =

Path = dir/foobar
Size = 7
Packed Size = 11
Modified = 2025-09-27 22:55:25.7947183
Attributes = A -rw-r--r--
CRC = B22C9747
Encrypted = -
Method = LZMA2:12
Block = 0

This change is Reviewable

7z shows an empty CRC for empty files when generating an archive manifest:
```
▸ mkdir dir
▸ touch dir/empty
▸ echo foobar >dir/foobar
▸ 7z a test.7z dir
[…]

▸ 7z -ba h dir
                        dir
B22C9747             7  dir/foobar
00000000             0  dir/empty

▸ 7z -ba -slt l test.7z
Path = dir
Size = 0
Packed Size = 0
Modified = 2025-09-27 22:55:25.7947183
Attributes = D drwxr-xr-x
CRC =
Encrypted = -
Method =
Block =

Path = dir/empty
Size = 0
Packed Size = 0
Modified = 2025-09-27 22:43:34.0722990
Attributes = A -rw-r--r--
CRC =
Encrypted = -
Method =
Block =

Path = dir/foobar
Size = 7
Packed Size = 11
Modified = 2025-09-27 22:55:25.7947183
Attributes = A -rw-r--r--
CRC = B22C9747
Encrypted = -
Method = LZMA2:12
Block = 0
```
@Frenzie Frenzie added this to the 2025.10 milestone Sep 27, 2025
@Frenzie
Frenzie merged commit e39db36 into koreader:master Sep 27, 2025
4 checks passed
@benoit-pierre
benoit-pierre deleted the pr/fix_mkrelease_corner_case branch September 27, 2025 22:40
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
7z shows an empty CRC for empty files when generating an archive manifest:
```
▸ mkdir dir
▸ touch dir/empty
▸ echo foobar >dir/foobar
▸ 7z a test.7z dir
[…]

▸ 7z -ba h dir
                        dir
B22C9747             7  dir/foobar
00000000             0  dir/empty

▸ 7z -ba -slt l test.7z
Path = dir
Size = 0
Packed Size = 0
Modified = 2025-09-27 22:55:25.7947183
Attributes = D drwxr-xr-x
CRC =
Encrypted = -
Method =
Block =

Path = dir/empty
Size = 0
Packed Size = 0
Modified = 2025-09-27 22:43:34.0722990
Attributes = A -rw-r--r--
CRC =
Encrypted = -
Method =
Block =

Path = dir/foobar
Size = 7
Packed Size = 11
Modified = 2025-09-27 22:55:25.7947183
Attributes = A -rw-r--r--
CRC = B22C9747
Encrypted = -
Method = LZMA2:12
Block = 0
```
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