Merging upstream version 1.24.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
cefe4620fe
commit
bbed90a132
35 changed files with 910 additions and 848 deletions
11
reproduce.cc
11
reproduce.cc
|
@ -1,5 +1,5 @@
|
|||
/* Lziprecover - Data recovery tool for the lzip format
|
||||
Copyright (C) 2009-2023 Antonio Diaz Diaz.
|
||||
Copyright (C) 2009-2024 Antonio Diaz Diaz.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -532,8 +532,9 @@ int reproduce_file( const std::string & input_filename,
|
|||
{ show_file_error( filename, lzip_index.error().c_str() );
|
||||
return lzip_index.retval(); }
|
||||
|
||||
output_filename = default_output_filename.empty() ?
|
||||
insert_fixed( input_filename ) : default_output_filename;
|
||||
const bool to_file = default_output_filename.size();
|
||||
output_filename =
|
||||
to_file ? default_output_filename : insert_fixed( input_filename );
|
||||
if( !force && output_file_exists() ) return 1;
|
||||
outfd = -1;
|
||||
int errors = 0;
|
||||
|
@ -593,7 +594,7 @@ int reproduce_file( const std::string & input_filename,
|
|||
{
|
||||
if( !safe_seek( infd, 0, filename ) ) return 1;
|
||||
set_signal_handler();
|
||||
if( !open_outstream( true, true ) ) return 1;
|
||||
if( !open_outstream( true, true, false, true, to_file ) ) return 1;
|
||||
if( !copy_file( infd, outfd ) ) // copy whole file
|
||||
cleanup_and_fail( 1 );
|
||||
}
|
||||
|
@ -619,7 +620,7 @@ int reproduce_file( const std::string & input_filename,
|
|||
filename );
|
||||
return 0;
|
||||
}
|
||||
if( close_outstream( &in_stats ) != 0 ) return 1;
|
||||
if( !close_outstream( &in_stats ) ) return 1;
|
||||
if( verbosity >= 0 )
|
||||
{
|
||||
if( errors > 1 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue