Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
78 user(s) are online (73 user(s) are browsing Forums)

Members: 1
Guests: 77

Mr_byte, more...

Support us!

Headlines

 
  Register To Post  

Lha Issues: Can lha pack files with spaces and other questions
Home away from home
Home away from home


See User information
It seems I blind, but can lha pack the files with spaces? For me, it just replaces all spaces in filenames to "_", and I can't see in help output anything about


Edited by kas1e on 2021/4/15 8:57:03
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Can lha pack files with spaces ?
Home away from home
Home away from home


See User information
@kas1e

TL;DR;

add -H0 to the options

ie full command should be

lha -H0 -a a foo.lha "bar bash"

Longer:

LHA isn't the issue it's UnArc

10.RAM Disk:> echo foo "bar bash"
10.RAM Disk:> lha a foo.lha "bar bash" 


Creating new archive 'foo.lha':
     
Stored: (  0.0%)       =>      bar bash
1 file added
all files OK.

Operation successful.

10.RAM Disk:> delete "bar bash" 
10.RAM Disk:> lha x foo.lha 


Extracting from archive 
'foo.lha':
 
Extracting: (       4/       4)  bar bash
1 file extracted
all files OK.

Operation successful.

10.RAM Disk:> list
bar bash                          4 ----rwed Today     11:36:18
foo
.lha                          40 ----rw-d Today     11:36:30


By default lha sets -H1 and when this is set Unarc shows the files with spaces with underscores but lha itself still decodes with spaces.



Go to top
Re: Can lha pack files with spaces ?
Home away from home
Home away from home


See User information
@broadblues

Oh thanks, -H0 did the trick !

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Can lha pack files with spaces ?
Just can't stay away
Just can't stay away


See User information
@kas1e

It was fixed in 2011 (Edit: possibly earlier) by Chris Young in an update to the XAD LHA client.

https://www.amigans.net/modules/xforum ... ASC&topic_id=4787&forum=3



Go to top
Re: Can lha pack files with spaces ?
Home away from home
Home away from home


See User information
@Mick
I wasn't' use XAD, just pure lha to packing only. For unpacking, I always use dopus4, which it also didn't use XAD, but pure lha too.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Can lha pack files with spaces ?
Just can't stay away
Just can't stay away


See User information
Dopus4 uses XAD in some situations. Definitely when double-clicking. Maybe when clicking the Extract button too? Can't remember off the top of my head. Of course, it also matters what settings you have.

Edit: Just had a quick look. Default settings for Dopus4 are to use XAD for the Extract button. Doesn't seem to be any default for Click-M-Click (at least not after deleting DirectoryOpus.CFG).

Edit 2: Mine is set up to use "xadUnFile" to extract lha. I didn't manually configure it that way, so it must be a default somewhere (just not after removing the .CFG).

Edit 3: OK, after deleting the .CFG, it is xadUnFile for click-m-click for lha (under ARC class) but for some reason it isn't working until I put my old .CFG back.... which has the same settings. Weird. Can't even drag files from left to right sections to copy them, not that I usually use that method anyway. Hmm.

Edit 4: I discovered a bug in Dopus4 4.18.44. If you delete the .cfg, the "Default" filetype is the command "Co" for Click-M-Click and "SmartRe" for LMB Double-click instead of "Copy" and "SmartRead", and the default class has MatchName with no pattern to match, instead of a #? pattern.


Edited by MickJT on 2019/12/23 15:06:15
Edited by MickJT on 2019/12/23 15:09:30
Edited by MickJT on 2019/12/23 15:17:00
Edited by MickJT on 2019/12/23 15:26:55
Edited by MickJT on 2019/12/23 15:42:24
Edited by MickJT on 2019/12/23 15:44:38
Go to top
Re: Can lha pack files with spaces ?
Just can't stay away
Just can't stay away


See User information
@MickJT
The Dopus4 sources are at Sourceforge with the name "diropus4". There are OS3, MOS & OS4 versions there. The OS4 code is at:
https://sourceforge.net/p/diropus4/code/HEAD/tree/dopus4-os4/trunk/

I uploaded binaries for OS3 & OS4 versions to the repository but can't even navigate the repository very well with OS4 browsers any more. You can D/L a snapshot of the OS4 code and fix your own version if you want but it's just easier to use external AmigaDOS commands for most things.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Lha Issues: Can lha pack files with spaces and other questions
Home away from home
Home away from home


See User information
@All

Is lha capable of packing/unpacking archives of 1.2GB of size? Why I ask, because I tried to pack some data files, and while they pack well when I tried to unarc them, I just fail with some "illegal errors" coming from unarc as archive corrupted.

It can be of course unarc itself and its modules, but then don't want to create issues for users, and then how better to pack it then? 7zip causes issues as well on big archives when unpacking.

Maybe just good old zip ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Lha Issues: Can lha pack files with spaces and other questions
Home away from home
Home away from home


See User information
@kas1e

Memory issues maybe? Depending how files are unpacked largere files might need lots of memory,

Go to top
Re: Lha Issues: Can lha pack files with spaces and other questions
Home away from home
Home away from home


See User information
@kas1e

The problem with lha is, that is uses ram to buffer both crunching and decrunching files.
As long as one of the files is not bigger than the maximum amount of ram you have available, it will work (and it will even create packages over 2 GB in size, i've done a lot of them).

But, as soon as you run out of memory, lha will refuse and gracefully exit.

On my X1000 i'm limited to approx. 800MB sized single files, so no DVD images (CD images work, though).

I wonder if "Archiver" can be rewritten to also crunch files?
I also wonder if the lha sourcecode is available and if it could be learned to use HDD space for buffering?

Go to top
Re: Lha Issues: Can lha pack files with spaces and other questions
Home away from home
Home away from home


See User information
@Andy, Raziel
It didn't look like I fill the ram, and the archive contains just lots of small files. But I better go .zip way, for now, it works fine for such a bit archive.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project