diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2010-01-31 12:01:54 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2010-01-31 12:01:54 +0200 |
commit | 231c3c7098f1099a56abb8afece76fc9b8699f05 (patch) | |
tree | 5887a319a46895b20f87075ba4f3b467a84bd85b /src/xz/file_io.h | |
parent | Add list.h to src/xz/Makefile.am. (diff) | |
download | xz-231c3c7098f1099a56abb8afece76fc9b8699f05.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | src/xz/file_io.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xz/file_io.h b/src/xz/file_io.h index 94d4c174..967da868 100644 --- a/src/xz/file_io.h +++ b/src/xz/file_io.h @@ -72,8 +72,12 @@ extern void io_init(void); extern void io_no_sparse(void); -/// \brief Opens a file pair -extern file_pair *io_open(const char *src_name); +/// \brief Open the source file +extern file_pair *io_open_src(const char *src_name); + + +/// \brief Open the destination file +extern bool io_open_dest(file_pair *pair); /// \brief Closes the file descriptors and frees possible allocated memory |