Bug#871924: jlha does not support Amiga LhA files
Stuart Caie
kyzer at cabextract.org.uk
Sat Aug 12 14:56:05 UTC 2017
Package: libjlha-java
Version: 0.0.20050504-9
Amiga LhA is a variant of MS-DOS LHA which tweaks the file format to
store filenotes. jlha does not support them. I've attached a patch to
add support.
AmigaDOS allows files to have a "filenote", free-form ISO-8859-1 text up
to 80 characters. Amiga LhA archives this by appending it to the stored
file path, separated from the path by a null byte.
For example, if you download the archive at
https://www.exotica.org.uk/wiki/The_Wall you'll find two files in the
archive, the first archive file has path "The_Wall\\mod.days of
fury\0Martin de Agger | The Wall | 1990 | Kefrens" (note the null byte).
The intended filename is "The Wall/mod.days of fury"
00000000: 5b562d6c 68352d0b 0101005e a5010073 [V-lh5-....^...s
00000010: 52792d00 00455468 655f5761 6c6c5c6d Ry-..EThe_Wall\m
00000020: 6f642e64 61797320 6f662066 75727900 od.days of fury.
00000030: 4d617274 696e2064 65204167 67657220 Martin de Agger
00000040: 7c205468 65205761 6c6c207c 20313939 | The Wall | 199
00000050: 30207c20 4b656672 656e7350 7c25e885 0 | KefrensP|%..
jlha doesn't know about this trick, so it doesn't support it:
$ jlha v The_Wall.lha
PERMSSN UID GID PACKED SIZE RATIO METHOD CRC STAMP
NAME
---------- ----------- ------- ------- ------ ---------- ------------
-------------
[generic] 65803 107870 61.0% -lh5- 7c50 Nov 25 2002
The_Wall/mod.days of furyMartin de Agger | The Wall | 1990 | Kefrens
[generic] 66429 95176 69.7% -lh5- 5101 Nov 25 2002
The_Wall/mod.thunder-wallMartin de Agger | The Wall | 1990 | Kefrens
---------- ----------- ------- ------- ------ ---------- ------------
-------------
Total 2 files 132232 203046 65.1% Aug 12 13:14
$ jlha x The_Wall.lha
The_Wall/mod.days of furyMartin de Agger | The Wall | 1990 | Kefrens
- Melted : Aug 12, 2017 3:50:34 PM org.jlhafrontend.JLHAFrontEnd extract
SEVERE: open OutputStream error java.io.FileNotFoundException: Invalid
file path
Aug 12, 2017 3:50:34 PM org.jlhafrontend.JLHAFrontEnd extract
SEVERE: open OutputStream error java.io.FileNotFoundException: Invalid
file path
The_Wall/mod.thunder-wallMartin de Agger | The Wall | 1990 | Kefrens
- Melted : Aug 12, 2017 3:50:34 PM org.jlhafrontend.JLHAFrontEnd extract
SEVERE: open OutputStream error java.io.FileNotFoundException: Invalid
file path
Aug 12, 2017 3:50:34 PM org.jlhafrontend.JLHAFrontEnd extract
SEVERE: open OutputStream error java.io.FileNotFoundException: Invalid
file path
I've attached a patch to fix this. Once applied, jlha handles the
archives correctly.
$ lha v The_Wall.lha
PERMSSN UID GID PACKED SIZE RATIO METHOD CRC STAMP
NAME
---------- ----------- ------- ------- ------ ---------- ------------
-------------
[generic] 65803 107870 61.0% -lh5- 7c50 Nov 25 2002
The_Wall/mod.days of fury
[generic] 66429 95176 69.7% -lh5- 5101 Nov 25 2002
The_Wall/mod.thunder-wall
---------- ----------- ------- ------- ------ ---------- ------------
-------------
Total 2 files 132232 203046 65.1% Aug 12 13:14
$ lha x The_Wall.lha
The_Wall/mod.days of fury - Melted : oooooooooooooo
The_Wall/mod.thunder-wall - Melted : oooooooooooo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-Amiga-LhA-files.patch
Type: text/x-patch
Size: 1613 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20170812/4565aee0/attachment.bin>
More information about the pkg-java-maintainers
mailing list