]> icculus.org git repositories - icculus/xz.git/commit - src/xz/message.c
Delay opening the destionation file and other fixes.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 31 Jan 2010 10:01:54 +0000 (12:01 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sun, 31 Jan 2010 10:01:54 +0000 (12:01 +0200)
commit231c3c7098f1099a56abb8afece76fc9b8699f05
tree5887a319a46895b20f87075ba4f3b467a84bd85b
parent0dbd0641db99d5e73d51d04ce7a71e52dc6b4105
Delay opening the destionation file and other fixes.

The opening of the destination file is now delayed a little.
The coder is initialized, and if decompressing, the memory
usage of the first Block compared against the memory
usage limit before the destination file is opened. This
means that if --force was used, the old "target" file won't
be deleted so easily when something goes wrong very early.
Thanks to Mark K for the bug report.

The above fix required some changes to progress message
handling. Now there is a separate function for setting and
printing the filename. It is used also in list.c.

list_file() now handles stdin correctly (gives an error).

A useless check for user_abort was removed from file_io.c.
src/xz/coder.c
src/xz/file_io.c
src/xz/file_io.h
src/xz/list.c
src/xz/message.c
src/xz/message.h