This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: forwarded message from Adam Heath
- To: 116145 at bugs dot debian dot org
- Subject: Re: forwarded message from Adam Heath
- From: Per Bothner <per at bothner dot com>
- Date: Thu, 25 Oct 2001 16:34:12 -0700
- CC: java at gcc dot gnu dot org
- References: <15320.39495.965333.183669@gargle.gargle.HOWL>
Matthias Klose wrote:
>Not only does fastjar obliterate existing contents in a jar when updating,
>but, it appears it can also corrupt the file.
>
Yes, I ran into the same problem. Basically the implementation of 'u'
is pretty much not there. I looked at trying to fix it, but decided I
didn't
have time. Until somebody fixes it, we should change fastjar to exit
with an
error on 'u'.
The first question is whether fastjar should try to update
in place or create a temporary file and copy it over. The former is faster,
especially when just adding files, and is less liable to run out of disk
space.
However, it is tricky when files are replaced that are not at the end.
In that
case I guess the solution is to read the archive members that need to be
moved
into main memory.
Then it is just a small matter of programming ...