From 018cead199f4ee24f0286cbd033355eae7f8fdae Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 12:50:02 +0100 Subject: Merging upstream version 1.17~pre1. Signed-off-by: Daniel Baumann --- main.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'main.cc') diff --git a/main.cc b/main.cc index 0bc2322..167e8c6 100644 --- a/main.cc +++ b/main.cc @@ -92,7 +92,14 @@ bool delete_output_on_interrupt = false; void show_help() { std::printf( "%s - Data recovery tool and decompressor for the lzip format.\n", Program_name ); - std::printf( "\nUsage: %s [options] [files]\n", invocation_name ); + std::printf( "Lziprecover can repair perfectly most files with small errors (up to one\n" + "single-byte error per member), without the need of any extra redundance\n" + "at all. Losing an entire archive just because of a corrupt byte near the\n" + "beginning is a thing of the past.\n" + "Lziprecover can also produce a correct file by merging the good parts of\n" + "two or more damaged copies, extract data from damaged files, decompress\n" + "files and test integrity of files.\n" + "\nUsage: %s [options] [files]\n", invocation_name ); std::printf( "\nOptions:\n" " -h, --help display this help and exit\n" " -V, --version output version information and exit\n" @@ -304,10 +311,12 @@ void close_and_set_permissions( const struct stat * const in_statsp ) std::string insert_fixed( std::string name ) { - if( name.size() > 4 && name.compare( name.size() - 4, 4, ".tlz" ) == 0 ) - name.insert( name.size() - 4, "_fixed" ); + if( name.size() > 7 && name.compare( name.size() - 7, 7, ".tar.lz" ) == 0 ) + name.insert( name.size() - 7, "_fixed" ); else if( name.size() > 3 && name.compare( name.size() - 3, 3, ".lz" ) == 0 ) name.insert( name.size() - 3, "_fixed" ); + else if( name.size() > 4 && name.compare( name.size() - 4, 4, ".tlz" ) == 0 ) + name.insert( name.size() - 4, "_fixed" ); else name += "_fixed.lz"; return name; } -- cgit v1.2.3