diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:50:02 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:50:02 +0000 |
commit | 018cead199f4ee24f0286cbd033355eae7f8fdae (patch) | |
tree | f0a935bac9c716aa3eed352755efa62e1b2b8206 /main.cc | |
parent | Adding debian version 1.16-2. (diff) | |
download | lziprecover-018cead199f4ee24f0286cbd033355eae7f8fdae.tar.xz lziprecover-018cead199f4ee24f0286cbd033355eae7f8fdae.zip |
Merging upstream version 1.17~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'main.cc')
-rw-r--r-- | main.cc | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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; } |