[Coco] OS9 LHA v2.11c how to add empty dirs to archive

Jeff Teunissen deek at d2dc.net
Sat Nov 14 03:16:32 EST 2020


I don't think that's actually possible. It is possible to create a LZH
file containing an empty directory (it uses the special "compression
type" d), but the OS-9 binary doesn't appear to be able to create (or
extract) files with that compression method.

I made a file on my Linux machine, foo.lzh, and added a newly-created
directory and a file to that archive:

$ lha a foo.lzh foo part3.c
part3.c - Frozen(56%) oo
$ lha l foo.lzh
 PERMSSN    UID  GID      SIZE  RATIO     STAMP           NAME
---------- ----------- ------- ------ ------------ --------------------
[generic]                    0 ****** Nov 14  2020 foo/
[generic]                15726  25.9% Nov 09  2020 part3.c
---------- ----------- ------- ------ ------------ --------------------
 Total         2 files   15726  25.9% Nov 14 03:03

Then I copied it to my CoCo, and tried listing and extracting it.
Listing the file found the directory, but couldn't print its name as
anything other than "+" but correctly identified it as a file of zero
bytes with "Type" -lhd- and CRC 0000. Extracting the archive, lha
reported that the first file (the directory) was "Skipped" because it
had an unknown method. The second file, part3.c, was Melted
successfully, so it was a valid archive.

On Thu, Nov 12, 2020 at 10:39 AM William Carlin <whcarlinjr at gmail.com> wrote:
>
> Does anyone know what command line switches to use to allow OS9 LHA v2.11
> to allow empty directories to be included in archives.  I've tried all
> kinds of command line switches and adding the folder to the DIR/ and
> filespec.
>
> I'm trying to include an empty CMDS directory in my archive so that when
> the archive is expanded with 'lha x' command the CMDS folder is created in
> the specified destination path.
>
> I've tried:
>
> lha a -rx archive.lzh dirs/*
> lha a -rxp archive.lzh dirs/*
> lha a -rxpa archive.lzh dirs/*
> lha a -rx archive.lzh dirs/CMDS/ dirs/*
> lha a -rxp archive.lzh dirs/CMDS/ dirs/*
> lha a -rxpa archive.lzh dirs/CMDS/ dirs/*
> lha a -rxpa archive.lzh dirs/CMDS/. dirs/*
>
> William Carlin
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list